Routers play an important role in computer networks and are the bridge to computer networks. It not only allows you to connect to different networks, but also select the path of data transmission and block illegal access.
The configuration of the router is not very easy for beginners. Now I will introduce the general configuration and simple debugging of the router to everyone for reference when configuring the router. This article takes Cisco2501 as an example.
The Cisco2501 has an Ethernet port (AUI), a Console port (RJ45), an AUX port (RJ45) and two synchronous serial ports. It supports DTE and DCE devices and supports EIA/TIA-232, EIA/TIA-449, V.35, X.25 and EIA-530 interfaces.
one. Configuration
1. Configure Ethernet port
# conf t (configure the router from the terminal)
# int e0 (specify port E0)
# ip addr ABCD XXXX (ABCD is the Ethernet address, XXXX is the subnet mask)
# ip addr ABCD XXXX secondary (E0 supports two address types at the same time. If the first one is a Class A address, the second one is a Class B or C address)
# no shutdown (activate E0 port)
# exit
After completing the above configuration, use the ping command to check whether the E0 port is normal. If it is not normal, it is usually because the port is not activated, which is often easy for beginners to ignore. Use the no shutdown command to activate the E0 port.
2. X.25 configuration
# conf t
# int S0 (Specify S0 port)
# ip addr ABCD XXXX (ABCD is the IP address of Ethernet S0, XXXX is the subnet mask)
# encap X25-ABC (encapsulates X.25 protocol. ABC specifies X.25 as DTE or DCE operation, default is DTE)
# x25 addr ABCD (ABCD is the X.25 port address of S0, provided by the Post and Telecommunications Office)
# x25 map ip ABCD XXXX br (map X.25 address. ABCD is the IP address of the opponent's router (such as S0), and XXXX is the X.25 port address of the opponent's router (such as S0))
# x25 htc X (Configure the maximum number of bidirectional channels. The value range of X is 1-4095, and it must be configured according to the actual digital configuration provided by the Post and Telecommunications Bureau)
# x25 nvc X (configure the number of virtual circuits, X cannot exceed the actual number provided by the post office, otherwise it will affect the normal transmission of data)
# exit
After the S0 port is configured, use the no shutdown command to activate the E0 port. If the ping S0 port is normal and the ping mapped X.25 IP address, i.e. the other router port IP address, may be caused by the following situations: 1) The local X.25 address is incorrectly configured, and re-checked with the post office (the length of the X.25 address is 13 bits); 2) The local mapped IP address or X.25 address is incorrectly configured, and the reconfiguration is correct; 3) The other party's IP address or X.25 address is incorrectly configured; 4) The local or other party's routing is incorrect.
Can communicate with the other party, but there is packet loss. In this case, there are generally the following possibilities: 1) The circuit condition is not good, or the network card and RJ45 plugs are poorly contacted; 2) The value range of the maximum bidirectional channel number X and the number of x25nvc virtual circuits X exceed the actual number provided by the Post and Telecommunications Bureau. The higher the two values, the maximum number of bidirectional channels and the number of virtual circuits, the better, but they must not exceed the actual number provided by the Post and Telecommunications Bureau, otherwise packet loss will occur.
3. Dedicated line configuration
# conf t
# intS2 (Specify S2 port)
# ip addr ABCD XXXX (ABCD is the IP address of S2, XXXX is the subnet mask)
# exit
After the dedicated line port configuration is completed, use the no shutdown command to activate the S2 port.
4. Frame relay configuration
# conf t
# int s0
# ip addr ABCD XXXX (ABCD is the IP address of S0, XXXX is the subnet mask)
# encap frante_relay (encapsulate frante_relay protocol)
# no nrzi_encoding (NRZI=NO)
# frame_relay lmi_type q933a (LMI uses the Q933A standard. LMI (Local management Interface) has 3 types: ANSI: T1.617, CCITTY: Q933A and Cisco-specific standards)
# fram-relay intf-typ ABC (ABC is the type of frame relay device, which are supported by DTE device, DCE switch or NNI (network contact interface))
# frame_relay interface_dlci 110 br (Configure DLCI (Data Link Connection Identifier))
# frame-relay map ip ABCD XXXX broadcast (Create a frame relay map. ABCD is the other party's IP address, XXXX is the local DLCI number, broadcast allows broadcast forwarding or update routes)
# no shutdown (activate this port)
# exit
After the configuration of the frame relay S0 port is completed, use the ping command to check the S0 port. If it is not normal, it is usually because the port is not activated, just use the no shutdown command to activate the S0 port. If the ping S0 port is normal and the IP address mapped by the ping is abnormal, it may be that the frame relay switch or the other party is configured incorrectly, and a comprehensive investigation is required.
5. Configure synchronous/asynchronous ports (for 2522)
# conf t
# int s2
# ph asyn (Configure S2 as an asynchronous port)
# ph sync (Configure S2 as a synchronization port)
6. Dynamic routing configuration
# conf t
# router eigrp 20 (using EIGRP routing protocol. Common routing protocols include RIP, IGRP, IS-IS, etc.)
# passive-interface serial0 (If S0 is connected to X.25, enter this command)
# passive-interface serial1 (If S1 is connected to X.25, enter this command)
# network ABCD (ABCD is the Ethernet address of the machine)
# network XXXX (XXXX is the IP address of S0)
# no auto-summary
# exit
7. Configuration of static routing
# ip router ABCD XXXX YYY 90 (ABCD is the Ethernet address of the other party's router, XXXX is the subnet mask, and YYYY is the corresponding WAN port address of the other party)
# dialer-list 1 protocol ip permail
two. Comprehensive debugging
After the router is fully configured, a comprehensive debugging can be performed.
1. First, activate the router's Ethernet port and all serial ports to be used. The method is to enter this port and execute no shutdown.
2. Add the default route to the host connected to the router (the Ethernet address of the central router). The method is to execute under the super user of the Unix system: router add default XXXX 1 (XXXX is the E0 address of the router). Each host must add a default route, otherwise, communication will not be possible.
3. Ping the router Ethernet port of this machine. If it is not connected, the Ethernet port may not be activated or is not on the same network segment. If the WAN port is not connected, no default route will be added. ping the other party's WAN port. If it is not connected, the router configuration is incorrect. If the ping host Ethernet port is not connected, the other host will not add the default route.
4. Add gateway (static route) to the dedicated line card X.25 host. The method is to execute under the super user of the Unix system: router add 1 (the other party's Ethernet address and the other party's WAN address).
5. Use Tracert to track the route to determine if the network segment is not accessible.
Article entry: csh Editor in charge: csh