Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Lab: configuring a static default rout

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

The purpose of the experiment is to configure the static default route of the router and make each network terminal communicate with each other.

Idea: 1 manually configure 4 PC IP addresses and gateways

2 configure the IP address of each port of each router in turn

3 configure static default routes on the left and right sides

4 configure static routes for intermediate routers

Specific operations:

1 configure terminal IP address and gateway to skip

2 configure the IP address of the router on the left

Rename the router and configure the interface gig0/0 with an IP address

Router > en

Router#configure terminal

Router (config) # hostname R1

R1 (config) # interface gig0/0

R1 (config-if) # no shut

R1 (config-if) # ip address 192.168.1.254 255.255.255.0

R1 (config-if) # exit

Configure IP address on interface gig0/1

R1R (config) # interface gig0/1

R1 (config-if) # no shut

R1 (config-if) # ip address 192.168.2.254 255.255.255.0

R1 (config-if) # exit

Configure IP address on interface gig0/2

R1 (config) # interface gig0/2

R1 (config-if) # no shut

R1 (config-if) # ip address 192.168.10.1 255.255.255.0

R1 (config-if) # exit

Do the same to configure IP addresses on the other two routers

The middle router name is changed to R2, and the right router name is changed to R3

3 configure a static default route for R1

R1 (config) # ip route 0.0.0.0 0.0.0.0 192.168.10.2 / / access any other network segment through the port with IP address 192.168.10.2 (R2-gig0/1)

Configure static routes for R2

R2 (config) # ip route 192.168.1.0 255.255.255.0 192.168.10.1

R2 (config) # ip route 192.168.2.0 255.255.255.0 192.168.10.1

R2 (config) # ip route 192.168.4.0 255.255.255.0 192.168.20.2

Configure a static default route for R3

R3 (config) # ip route 0.0.0.0 0.0.0.0 192.168.20.1 / / access any other network segment through the port (R2-gig0/2) with the IP address 192.168.20.1.

At this point, you can verify R1 (config) # show ip route by command.

Achieve the purpose of the experiment

Summary: 1 when configuring a static default route, the intermediate router R2 is configured with a specified network segment. Why not configure a default route for R2? Because the default route can only be used at the edge of the network, if a default route is configured on the intermediate router, a loop will be formed and the packet will be lost when sending the message. During the experiment in the cisco simulator, if you configure the default route on R2, you will find that you can PING by using the PING command at the terminal, because the simulator cannot simulate the real environment 100%.

2 the default route at the end of the network can greatly simplify the router configuration without adding the destination network segment one by one. When we do not know the destination network segment, we also use the default route for configuration.

3 default route also has its own disadvantages: for example, it takes longer to reach the target network segment than the general static route, and it will be asked in turn when reaching the target network segment, resulting in a waste of network resources.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report