[Lab environment]
Cisco Packet Tracer 5.3.2
[PURPOSE]
Exercise the use of the ip default-network command to declare the default route in the network routing protocol.
[Experiment topology]
[Lab description]
Vrogw GW and ISP refer to the default route to simulate the network between the gateway and the carrier. The VPN protocol is only deployed in the network.
The loop 0 interface on the router ISP simulates the external network (1.1.1.1)
Generally, R1 and R2 need to manually specify the default route ip route 0.0.0.0 0.0.0.0 xxxx to allow PC0 and PC1 to access the external network (1.1.1.1). If there are many routers under GW, in this way, a large amount of work will be added. At this time, the default route can be automatically advertised to other routers by using the VPN gateway.
Use ip default-network to declare the default route conditions in network:
1. The ip default-network must be followed by the primary network number
2. the router must have a route pointing to the default network.
3. The default network must be declared in the OSPF process.
If the default network is not a primary network, for example, a network of 30, it must be automatically aggregated or manually aggregated into the primary network for declaration, I personally think it would be better to directly use redistribute static to re-distribute the default route to the MongoDB. This is the content of NP.
Lab procedure]
1. Router ISP:
!
Interface Loopback0
Ip address 1.1.1.1 255.255.255.255
!
Interface Serial0/0/0
Ip address 220.220.220.1 255.255.255.0
Clock rate 4000000
!
Ip classless
Ip route 0.0.0.0 0.0.0.0 220.220.220.2
!
2. vrogw GW:
!
Interface FastEthernet0/0
Ip address 172.16.0.2 255.255.255.0
!
Interface FastEthernet0/1
Ip address 172.16.1.2 255.255.255.0
!
Interface Serial0/0/0
Ip address 220.220.220.2 255.255.255.0
!
Router VPN 1
Passive-interface Serial0/0/0
Network 172.16.0.0
Network 220.220.220.0
No auto-summary
!
Ip classless
Ip default-network 220.220.220.0
Ip route 0.0.0.0 0.0.0.0 Serial0/0/0
!
GW (config) # router ei 1
// Disable automatic summary
GW (config-router) # no au
// Declare the default network
GW (config-router) # network 220.220.220.0
// Because the external interface can be set to passive because the external interface is only deployed in the campus network.
GW (config-router) # passive-interface Serial0/0/0
GW (config-router) # exit
// Set the default route to ISP
GW (config) # ip route 0.0.0.0 0.0.0.0 Serial0/0/0
// Specify the default network for announcement (Main Network)
GW (config) # ip default-network 220.220.220.0
3. Router R1:
!
Interface FastEthernet0/0
Ip address 172.16.0.1 255.255.255.0
!
Interface FastEthernet0/1
Ip address 192.168.0.254 255.255.255.0
!
Router VPN 1
Network 172.16.0.0
Network 192.168.0.0
No auto-summary
!
4. vror2 R2:
!
Interface FastEthernet0/0
Ip address 192.168.1.254 255.255.255.0
!
Interface FastEthernet0/1
Ip address 172.16.1.1 255.255.255.0
!
Router VPN 1
Network 172.16.0.0
Network 192.168.1.0
No auto-summary
!
5. Verification:
GW # sh ip ro
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.0.0 is directly connected, FastEthernet0/0
C 172.16.1.0 is directly connected, FastEthernet0/1
D 192.168.0.0/24 [90/30720] via 172.16.0.1, 01:08:19, FastEthernet0/0
D 192.168.1.0/24 [90/30720] via 172.16.1.1, 01:08:20, FastEthernet0/1
C * 220.220.220.0/24 is directly connected, Serial0/0/0
S * 0.0.0.0/0 is directly connected, Serial0/0/0
GW #
R1 # sh ip ro
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.0.0 is directly connected, FastEthernet0/0
D 172.16.1.0 [90/30720] via 172.16.0.2, 01:08:43, FastEthernet0/0
C 192.168.0.0/24 is directly connected, FastEthernet0/1
D 192.168.1.0/24 [90/33280] via 172.16.0.2, 01:08:43, FastEthernet0/0
D * 220.220.220.0/24 [90/20514560] via 172.16.0.2, 01:00:04, FastEthernet0/0
R1 #
R2 # sh ip ro
172.16.0.0/24 is subnetted, 2 subnets
D 172.16.0.0 [90/30720] via 172.16.1.2, 01:16:10, FastEthernet0/1
C 172.16.1.0 is directly connected, FastEthernet0/1
D 192.168.0.0/24 [90/33280] via 172.16.1.2, 01:16:10, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0
D * 220.220.220.0/24 [90/20514560] via 172.16.1.2, 01:07:31, FastEthernet0/1
R2 #
PC> ipconfig
IP Address...
Subnet Mask ......: 255.255.255.0
Default Gateway ......: 192.168.0.254
PC> ping 1.1.1.1
Pinging 1.1.1.1 with 32 bytes of data:
Reply from 1.1.1.1: bytes = 32 time = 34ms TTL = 253
Reply from 1.1.1.1: bytes = 32 time = 93 ms TTL = 253
Reply from 1.1.1.1: bytes = 32 time = 94 ms TTL = 253
Reply from 1.1.1.1: bytes = 32 time = 93 ms TTL = 253
Ping statistics for 1.1.1.1:
Packets: Sent = 4, stored ED = 4, Lost = 0 (0% loss ),
Approximate round trip times in milli-seconds:
Minimum = 34 ms, Maximum = 94 ms, Average = 78 ms
PC>