Router>en Router#conf t . Router(config)#host R1 R1(config)#no ip do lo R1(config)#line con 0 R1(config-line)#logg syn R1(config-line)#exec-timeout 0 0 R1(config-line)#exit R1(config)#
Router>en Router#conf t Router(config)#host R2 R2(config)#no ip do lo R2(config)#line con 0 R2(config-line)#logg syn R2(config-line)#exec-timeout 0 0 R2(config-line)#exit R2(config)#
R1#show ip int bri Interface IP-Address OK? Method Status Protocol FastEthernet0/0 unassigned YES unset administratively down down Serial1/0 unassigned YES unset up up Serial1/1 unassigned YES unset up up Serial1/2 unassigned YES unset administratively down down Serial1/3 unassigned YES unset administratively down down Virtual-Access1 unassigned YES unset down down Virtual-Template1 172.16.254.14 YES manual down down Virtual-Access2 172.16.254.14 YES TFTP up up Loopback0 192.168.3.1 YES manual up up Loopback1 192.168.4.1 YES manual up up R1#
测试一下
R1#ping 172.16.254.13 //这个是我们公司总部的路由器上面的IP地址
Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.16.254.13, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 20/36/72 ms R1#
Virtual-Access2 Bundle name: R2 Remote Endpoint Discriminator: [1] R2 远端的路由器名 Local Endpoint Discriminator: [1] R1 本地的路由器名 Bundle up for 00:05:48, total bandwidth 3088, load 1/255 我们可以看见总带宽是3088=1544k*2 Receive buffer limit 24384 bytes, frag timeout 1000 ms 0/0 fragments/bytes in reassembly list 0 lost fragments, 0 reordered 0/0 discarded fragments/bytes, 0 lost received 0xA received sequence, 0xA sent sequence Member links: 2 (max not set, min not set) Se1/0, since 00:05:49 Se1/1, since 00:05:37 No inactive multilink interfaces R1#
我们来查看一下我们的虚拟接口信息:
R1#show interfaces virtual-access 2 Virtual-Access2 is up, line protocol is up//我们可以看见我们两个都是up的 Hardware is Virtual Access interface Internet address is 172.16.254.14/24 //我们本地的IP地址 MTU 1500 bytes, BW 3088 Kbit, DLY 100000 usec, //在这里我们可以看见总带宽是3088k reliability 255/255, txload 1/255, rxload 1/255 Encapsulation PPP, LCP Open, multilink Open //我们可以查看到我们使用的是PPP 多链路已经打开了 Open: IPCP MLP Bundle vaccess, cloned from Virtual-Template1 Vaccess status 0x40, loopback not set Keepalive set (10 sec) DTR is pulsed for 5 seconds on reset R1#
查看一下路由表:
R1#sh ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks C 172.16.254.0/24 is directly connected, Virtual-Access2 C 172.16.254.13/32 is directly connected, Virtual-Access2 //我们可以看见,我们总部的IP地址显示在这里了 C 192.168.4.0/24 is directly connected, Loopback1 C 192.168.3.0/24 is directly connected, Loopback0 R1#
R1#sh ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks C 172.16.254.0/24 is directly connected, Virtual-Access2 C 172.16.254.13/32 is directly connected, Virtual-Access2 C 192.168.4.0/24 is directly connected, Loopback1 D 192.168.1.0/24 [90/3516928] via 172.16.254.13, 00:01:50, Virtual-Access2 D 192.168.2.0/24 [90/3516928] via 172.16.254.13, 00:01:50, Virtual-Access2 C 192.168.3.0/24 is directly connected, Loopback0 R1#