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

Static routing experiment 2 hosts + 2 Ethernet routers interworking

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

1. Static routing principle

Routing: Responsible for the work of the router control plane, determining the routing path that packets travel from the source to the destination (the best transmission path between the source host and the destination host)

Each interface on a router is a broadcast domain; each interface on a switch is a collision domain;

routing table: A collection of routing entries maintained in a router from which the router makes path selections

Routing table formation: directly connected segments and non-directly connected segments (directly connected and indirectly connected)

Non-direct: static and dynamic routing

Static routes are manually configured by administrators and are characterized by one-way and lack of flexibility (good for small ranges)

Default route: When the routing table cannot find a route entry for the target network, it forwards the request to the default routing interface (there is only one path to other network segments).

Priority: When there are both static routes and default routes in the routing table, the static route has the highest priority. If there is a match, it will be forwarded immediately. If there is no match, it will be forwarded according to the default route.

experimental environment

1: GNS3 software

2: Two initialized PCs (using VPCS) and two initialized routers

3: If the host is using a virtual machine, then all firewalls of the virtual machine need to be turned off, otherwise data transmission will be affected later.

experimental process

1: GNS3 software, say two PC hosts and two routers ready.

2: We connect all of them with network cables, define each IP address according to personal preferences, and write it next to the port to facilitate your own input of IP addresses and checks.

3: Run all the machines and record each IP address to the PC and router

Host setting IP address command: ip (space) ip address (space) network card resistance

Router IP address command: enter the respective interface mode, enter ip (space) address (space) IP address (space) subnet mask

4: Start trying to communicate

All IP address settings are complete and we try to communicate between PC1 and PC2.

Because PC1 and PC2 are disconnected, we add a static route of 192.168.30.0 for R2 between PC1 and PC2 for R1.

5: Add static routes to R1

Command line (in global mode): ip (space) route (space) network number (space) subnet mask (space) next hop address.

6: We found that PC1 can send messages to PC2, but PC2 can't receive them back.

So we still need to open the way back.

We now need to make sure that the feedback data is received by adding the static route 192.168.10.0 to R2's route.

Experimental Summary:

We found that if PC1 and PC2 could transmit, receive, and feed back to each other. R1 and R2 routes must be set to all static routing needs, if there are too many routes, then the workload will be very large. This is the disadvantage of static routing: (lack of flexibility).

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