静态路由和默认路由的配置实例_第1张图片
 
 
RTA的配置:
interface FastEthernet0/0
 ip address 1.1.1.2 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface FastEthernet1/0
 ip address 10.10.10.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/1
 ip address 20.20.20.1 255.255.255.0
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 1.1.1.9 255.255.255.252
 clock rate 9600
!
ip classless
ip route 2.2.2.0 255.255.255.252 1.1.1.1
ip route 192.168.1.0 255.255.255.0 1.1.1.1
ip route 172.16.1.0 255.255.255.0 1.1.1.10 100
RTB的配置:
interface FastEthernet0/0
 ip address 1.1.1.6 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface FastEthernet1/0
 ip address 172.16.1.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/1
 ip address 172.16.2.1 255.255.255.0
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 1.1.1.10 255.255.255.252
!
ip classless
ip route 2.2.2.0 255.255.255.252 1.1.1.5
ip route 192.168.1.0 255.255.255.0 1.1.1.5
ip route 2.2.2.0 255.255.255.252 1.1.1.9 100
ip route 1.1.1.0 255.255.255.252 1.1.1.9
ip route 192.168.1.0 255.255.255.0 1.1.1.9
RT-Core的配置:
interface FastEthernet0/0
 ip address 2.2.2.1 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface FastEthernet1/0
 ip address 1.1.1.1 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet1/1
 ip address 1.1.1.5 255.255.255.252
 duplex auto
 speed auto
!
interface Serial1/1/0
 no ip address
 shutdown
!
interface Serial1/1/1
 no ip address
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
ip classless
ip route 1.1.1.0 255.255.255.252 1.1.1.2
ip route 10.10.10.0 255.255.255.0 1.1.1.2
ip route 192.168.1.0 255.255.255.0 2.2.2.2
ip route 172.16.1.0 255.255.255.0 1.1.1.6
ip route 172.16.1.0 255.255.255.0 1.1.1.2 100
ip route 1.1.1.8 255.255.255.252 1.1.1.2
RT-internet配置:
interface FastEthernet0/0
 ip address 2.2.2.2 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.1.1 255.255.255.0
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
ip classless
ip route 0.0.0.0 0.0.0.0 2.2.2.1