课堂实战系列之二----企业级环境下DDN的配置

                                       企业级环境下DDN的配置
上一篇博文介绍了企业级的DDN的配置思路和原理,今天以课堂实战写具体配置。

试验环境:PC1  192.168.10.2   网关192.168.10.1
          PC2: 192.168.20.2   网关192.168.20.1
   路由器A  S0:202.110.100.1
   路由器B,  S0:202.110.100.2
路由器A和PC1是公司的总部,路由器B和PC2是公司的分支机构,现在要实现总部和分支机构的通信,在中间的干线上采用DDN干线。

利用动态路由配置企业级环境下DDN:
路由器A(公司总部)上的操作:
Router>
Router>en
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host A
A(config)#int e0
A(config-if)#ip addr 192.168.10.1 255.255.255.0
A(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
A(config-if)#int s0
A(config-if)#ip addr 202.110.100.1 255.255.255.0
A(config-if)#encap hdlc
A(config-if)#clock rate 56000
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up
A(config-if)#no shut
A(config-if)#
A(config-if)#exit
A(config)#router rip
A(config-router)#ver 2
A(config-router)#net 192.168.10.0
A(config-router)#net 202.110.100.0
 
A#show ip ro
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
       U - per-user static route
Gateway of last resort is not set
C    192.168.10.0 is directly connected, Ethernet0
C    202.110.100.0 is directly connected, Serial0
R    192.168.20.0 [120/1] via 202.110.100.2, 00:03:28, Serial0

[120/1];120是管理距离,1代表度量。在第三条路由的前面R是RIP协议,C表示直连路由,上面的CODES是模板的意思。
 
路由器B(分支公司)上的操作:
 
Router>
Router>
Router>en
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host B
B(config)#int e0
B(config-if)#ip addr 192.168.20.1 255.255.255.0
B(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
B(config-if)#int s0
B(config-if)#ip addr 202.110.100.2 255.255.255.0
B(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up
B(config-if)#exit
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
B(config)#router rip
B(config-router)#ver 2
B(config-router)#net 192.168.20.0
B(config-router)#net 202.110.100.0
 
B#
B#
B#show ip ro
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
       U - per-user static route
Gateway of last resort is not set
C    192.168.20.0 is directly connected, Ethernet0
C    202.110.100.0 is directly connected, Serial0
R    192.168.10.0 [120/1] via 202.110.100.1, 00:06:41, Serial0

在路由器2上做测试:一切顺利。
B#ping 202.110.100.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 202.110.100.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
B#ping 192.168.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
B#ping 192.168.10.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
B#ping 202.110.20.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 202.110.20.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5), round-trip min/avg/max = 1/2/4 ms
B#ping 192.168.20.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
 

利用静态路由配置企业级环境下DDN:
 
 
路由器A(公司总部)上的操作:

Router>
Router>en
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host A
A(config)#int e0
A(config-if)#ip addr 192.168.10.1 255.255.255.0
A(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
A(config-if)#int s0
A(config-if)#ip addr 202.110.100.1 255.255.255.0
A(config-if)#encap hdlc
A(config-if)#clock rate 56000
A(config-if)#no shut
 
A(config)#ip route 192.168.20.0 255.255.255.0 202.110.100.2

%LINK-3-UPDOWN: Interface Serial0, changed state to up
A(config-if)#exit
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
A(config)#ip route 192.168.20.0 255.255.255.0 202.110.100.2
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up

A#show ip ro
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
       U - per-user static route
Gateway of last resort is not set
C    192.168.10.0 is directly connected, Ethernet0
S    192.168.20.0 [1/0] via 202.110.100.2
C    202.110.100.0 is directly connected, Serial0
 
A#show interface e0
Ethernet0 is up, line protocol is up
  Hardware is Lance, address is 000C.4361.1005 (bia 000C.4361.1005)
  Internet address is 192.168.10.1/24
  MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, rely 255/255, load 1/255
  Encapsulation ARPA, loopback not set, keepalive set (10 sec)
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:00, output 00:00:00, output hang never
  Last clearing of show interface counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 1000 bits/sec, 2 packets/sec
  5 minute output rate 1000 bits/sec, 2 packets/sec
     0 packets input, 0 bytes, 0 no buffer
     Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     0 input packets with dribble condition detected
     0 packets output, 0 bytes, 0 underruns
     0 output errors, 0 collisions, 0 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out
 
 
A#show interface s0
Serial0 is up, line protocol is up
  Hardware is HD64570
  Internet address is 202.110.100.1/24
  MTU 1500 bytes, BW 1544 Kbit, DLY 1000 usec, rely 255/255, load 1/255
  Encapsulation HDLC, loopback not set, keepalive set (10 sec)
  Last input 00:00:00, output 00:00:00, output hang never
  Last clearing of show interface counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 1000 bits/sec, 2 packets/sec
  5 minute output rate 1000 bits/sec, 2 packets/sec
     0 packets input, 0 bytes, 0 no buffer
     Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     0 input packets with dribble condition detected
     0 packets output, 0 bytes, 0 underruns
     0 output errors, 0 collisions, 0 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out
 
路由器B(分支公司)上的操作:
 
Router>en
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host B
B(config)#int e0
B(config-if)#ip addr 192.168.20.1 255.255.255.0
B(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
B(config-if)#int s0
B(config-if)#ip addr 202.110.100.2 255.255.255.0
B(config-if)#encap hdlc
B(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up
B(config-if)#exit
B(config)#ip route 192.168.10.0 255.255.255.0 202.110.100.1

B#show ip ro
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
       U - per-user static route
Gateway of last resort is not set
C    192.168.20.0 is directly connected, Ethernet0
S    192.168.10.0 [1/0] via 202.110.100.1
S    192.168.10.0 [1/0] via 202.110.100.1
C    202.110.100.0 is directly connected, Serial0

B#
B#ping 202.110.100.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 202.110.100.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
B#ping 202.110.100.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 202.110.100.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
B#ping 192.168.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
B#ping 192.168.10.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

本文出自 “申雷岗 鸿鹄驰骋 欢迎您” 博客,转载请与作者联系!

你可能感兴趣的:(职场,休闲,动态路由,静态路由)