Windows Server R2 routers interconnect the network

Source: Internet
Author: User






1. How the Router works



When one host in an IP subnet sends an IP packet to another host on the same IP subnet, it will send the IP packet directly to the network, and the other party can receive it. In order to send a host to a different IP subnet, it chooses a router that can reach the destination subnet, groups the IP packets to the router, and the router is responsible for sending the IP packets to the destination. If such a router is not found, the host groups the IP to a router called the default gateway. The default gateway is a configuration parameter on each host that is the IP address of a router port that is connected to the same network.



When routers forward IP packets, the IP packets are only selected according to the network number portion of IP address of IP packet and the appropriate port is chosen. Like the host, the router also to determine whether the port is connected to the destination subnet, if so, directly to the packet through the port to the network, otherwise, also choose the next router to transfer the packet. The router also has its default gateway, which is used to send IP packets that do not know where to send. In this way, through the router to know how to transmit the IP packet correctly forwarded out, do not know the IP packet sent to the "default gateway" router, so that the level of transmission, IP packets will eventually be sent to the destination, the IP packet is not sent to the destination is discarded by the network.



At present, the TCP/IP network is interconnected by routers, and the Internet is an international network of thousands of IP subnets interconnected by routers. This network, known as router-based networks (router based network), forms a "network network" with routers as nodes. In the "Network Network", the router is not only responsible for the IP packet forwarding, but also responsible for contact with other routers, together to determine the "network Network" Routing and Maintenance routing table.



The routing action consists of two basic elements: path finding and forwarding. Path finding is the best route to reach the destination, which is realized by routing algorithm. Because of the different routing protocols and routing algorithms involved, it is relatively complex. To determine the best path, the routing algorithm must start and maintain the routing table containing the routing information, where the routing information depends on the routing algorithm used. The routing algorithm fills in the routing table with the different information collected, and according to the routing table, tells the router the relationship between the destination network and the next station (Nexthop). Routing updates between routers, updating and maintaining the routing table correctly reflects the topology change of the network, and the router determines the best path based on the metrics. This is the routing protocol (routing protocol), such as Routing Information Protocol (RIP), Open Shortest Path First Protocol (OSPF), and Border Gateway Protocol (BGP).



Forwarding is the best route along the path to send information grouping. The router first looks in the routing table to see if it knows how to send the packet to the next site (router or host), and if the router does not know how to send the packet, the packet is usually discarded, otherwise the packet is sent to the next site based on the corresponding table entry in the routing table, if the destination network is directly connected to the router, The router sends the packet directly to the appropriate port. This is the Routing and Forwarding Protocol (routed protocol).



Routing-forwarding Protocol and routing protocol are mutual and independent concepts, the former use the latter to maintain the routing table, while the latter to use the former provides the function to publish routing protocol data grouping. The routing protocols mentioned below, unless specifically stated, refer to routing protocols, which is also a common practice.






This is the output of the first parameter of the route command, first of all gives the interface list, a local loop, a wireless card, the last NIC interface, the NIC interface gives the MAC address of the network card.



Say the contents of each column, from the right: Network Destination (Destination address), Netmask (mask), Gateway, Interface (interface), Metric (is a metric or administrative distance).



Here's what each line of content represents, first of all



Network Destination Netmask Gateway Interface Metric



0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.103 20



This means that the data sent to any segment of the network is sent to a default gateway via the native Interface 192.168.0.103:192.168.0.1, which has a management distance of 20, where the administrative distance is said, the management distance refers to the information in the path selection process of confidence, the smaller the management distance, the higher the credibility.



And look at the second line.



Network Destination Netmask Gateway Interface Metric



127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1



Class A addresses 127.0.0.0 to retain local debugging, so the data sent to the 127.0.0.0 network through the local loopback 127.0.0.1 is sent to the specified gateway in the routing table: 127.0.0.1, that is, from its loopback interface to its own loopback interface, which will not occupy the LAN bandwidth.



Third line



Network Destination Netmask Gateway Interface Metric



192.168.0.0 255.255.255.0 192.168.0.103 192.168.0.103 20



The destination network here is in a LAN with this machine, so send to the network 192.168.0.0 (that is, the data sent to the LAN) using this machine: 192.168.0. 103 as a gateway, this eliminates the need for router routing or switch switching, which increases transmission efficiency.



Line Four



Network Destination Netmask Gateway Interface Metric



192.168.0.103 255.255.255.255 127.0.0.1 127.0.0.1 20



Represents a packet sent from its own host to its own host, if the use of the IP address of its own host, and the use of loopback address the same effect, through the same path is routed, that is, if I have my own site, I want to browse their site, The input localhost in the IE geology column is the same as 192.168.0.103, although localhost is parsed to be 127.0.0.1.



Line Five



Network Destination Netmask Gateway Interface Metric



192.168.0.255 255.255.255.255 192.168.0.103 192.168.0.103 20



The destination address here is a local broadcast address, the system for such a packet processing method is the native 192.168.0.103 as a gateway, send local broadcast frame, this frame will be filtered by the router.



Line Six



Network Destination Netmask Gateway Interface Metric



224.0.0.0 240.0.0.0 192.168.0.103 192.168.0.103 20



The destination address here is a multicast (muticast) network, which means that packets are sent to several specified IP addresses at the same time, and other addresses are not affected. The processing of the system is still applicable to the local computer as a gateway for routing. Here's a little bit to note that multicast can be forwarded by the router, and if the router does not support multicast, it is forwarded by broadcast mode.



Line Eighth



Network Destination Netmask Gateway Interface Metric



255.255.255.255 255.255.255.255 192.168.0.103 192.168.0.103 1



The destination address is a wide area broadcast, the same applies to native gateways, broadcast broadcast frames, such that packets arrive after the router is forwarded or discarded depending on the configuration of the router.



There's a half-line, no explanation.



Default gateway:192.168.0.1



This is a default gateway, if the destination of the data sent to the root of the preceding example does not match, the data is sent to the default gateway, which determines the route.



3. Windows Server R2 Router





? To see the delivery of packets by grasping the package tool




Currently I have not installed routing remote access, when 192.168.3.1ping192.168.2.2 at this time the client sends a broadcast only after the router receives the broadcast packet before it forwards it.



After routing remote access is installed






When LAN routing is enabled at this time, it can be ping192.168.2.2 when it is able to ping but ping192.168.2.1




When the 192.168.3.2ping192.168.2.2 packet is not 192.168.2.2 reply, but the 192.168.3.1 Nic replies. First the packet is broadcast, when the router in the network receives the broadcast packet, the computer looks at its routing table to discover the route of the destination network, and the target computer happens to be on its own, so the network responds directly to the request for the ping.



but ping192.168.2.1 the same packet is routed to the 192.168.2.0 network but at this point, the IP address of the destination computer is not the computer and is therefore forwarded to another router at this point the other router does not receive a routing request for the 192.168.3.0 network and therefore cannot respond to requests from 192.168.3.0 by the client



Add a permanent static route






To add a static route by command





To add a permanent static route by command



Local Area Connection (packet outbound)





Data packet Pit






Similarly add permanent static routes on another router




Test whether clients can access each other



This article is from "David's personal blog" blog, please be sure to keep this source http://xiewl.blog.51cto.com/8031493/1408685


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.