分类: 系统运维
2008-05-31 23:30:37
R1#sh run
interface Serial1/1
ip address 192.168.1.2 255.255.255.254
router rip
version 2
network 192.168.1.0
--------------------------------
R2#show run
hostname R2
interface Serial1/0
ip address 192.168.1.3 255.255.255.254
!
interface Serial1/1
ip address 192.168.2.1 255.255.255.0
router rip
version 2
network 192.168.1.0
network 192.168.2.0
---------------------------------------
R3#sh run
interface Serial1/0
ip address 192.168.2.2 255.255.255.0
router rip
version 2
network 192.168.2.0
--------------------------------------
r1#ping 192.168.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/90/128 ms
R3#ping 192.168.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 120/132/144 ms
实验完成
后继:
This option provides the same address space savings as
using a 31-bit subnet mask, but may only be used in links using PPP
encapsulation [RFC1332]. The use of host addresses allows for the
assignment of IP addresses belonging to different networks at each
side of the link, causing link and network management not to be
straight forward.
----
the loss of functionality of a directed
broadcast may actually be seen as a beneficial side effect, as it
slightly enhances the network's resistance to a certain class of DoS
Attacks [RFC2644, SMURF].
When a device wants to reach all the hosts on a given (remote, rather
than directly connected) subnet, it may set the packet's destination
address to the link's subnet broadcast address. This operation is
not possible for point-to-point links with a 31-bit prefix.
so use default route can solve this problom
R1
!
interface Serial1/1
ip address 192.168.1.7 255.255.255.254
encapsulation ppp
serial restart-delay 0
router rip
version 2
network 192.168.1.0
!
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.1.3
R2
!
interface Serial1/0
ip address 192.168.1.3 255.255.255.254
encapsulation ppp
serial restart-delay 0
!
router rip
version 2
network 192.168.1.0
network 192.168.2.0
R3
interface Serial1/0
ip address 192.168.2.2 255.255.255.0
router rip
version 2
network 192.168.2.0
r3#ping 192.168.1.7
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.7, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/56/92 ms
-------------
补充:
r1(config)#int s1/1
r1(config-if)#ip add 192.168.1.4 255.255.255.254
r1(config-if)#ip add 192.168.1.0 255.255.255.254
r3#ping 192.168.1.0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.0, timeout is 2 seconds:
!!!!!
r3#ping 192.168.1.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.4, timeout is 2 seconds:
!!!!!