Note ensp communication network topology - Static route

A topology

 

 

 

PC1-->192.168.10.1/24

PC2-->192.168.10.2/24

PC3-->192.168.20.1/24

PC4-->192.168.20.2/24

 

PC5-->192.168.30.1/24

PC6-->192.168.30.2/24

PC7-->192.168.40.1/24

PC8-->192.168.40.2/24

 

10 network gateway 192.168.10.254/24

20 network gateway 192.168.20.254/24

30 network gateway 192.168.30.254/24

40 network gateway 192.168.40.254/24

 

Second, device configuration

The left route - using a single arm portion --PC switch routing configuration (note that there is the divided vlan 4 10 20 30 40, respectively)

Into the router GE0 / 0 / 1-- added ip address ip address 172.16.1.1 24 (provided with the switch in the same network segment LSW4)

On the right route - switch - switch --PC configured as static routing:

1, the bottom switch arranged LSW2 PC interface type is access, GE0 / 0/2 interface type to trunk type, allows vlan30 40

2, the top switch LSW4:

Create vlan30 40, the interface GE0 / 0/1 as trunk type, allows vlan30 40

int vlanif30 vlan30-- added into the gateway address ip address 192.168.30.254 24 (Similarly for the set vlan40)

int vlanif 1 enters vlan1-- disposed ip address ip address 172.16.1.2 24 (router disposed in the same network segment)

Exit Port - set a static route ip route-static 0.0.0.0 0.0.0.0 172.16.1.1

3, enter the router R1-- set up a static route ip route-static 0.0.0.0 0.0.0.0 172.16.1.2

4, test connectivity, using a ping command to the first host to another first ping message request timed out will return the result, because the ongoing arp address resolution, the address resolution can successfully communicate.

 

Note:

The format for the static route ip route-static [network_IP_address (network address)] [Subnet Mask] [ip address of the next hop]

Therefore, ip route-static 0.0.0.0 0.0.0.0 172.16.1.2 single export default routing instructions that can be accessed through the entire network router to the next hop address 172.16.1.2.

For example, setting the network 192.168.2.0/24 packet may route to a next hop address 172.16.1.3 through static route, instruction was ip route-static 192.168.2.0 24 172.16.1.3

Principle: When the router receives a packet from the network of 192.168.2.0/24, the router to the packet delivered to the device address of the next hop of 172.16.1.3.

Guess you like

Origin www.cnblogs.com/dl115885/p/11784937.html