Through the router interface configuration command, you can configure:
- Description information of interface
- Transport Rate of Interface
- IP address of interface
- Encapsulation of interfaces
Basic configuration of router interface
Configuration interface description information
Enter the interface configuration mode and use the description command:
Explain that the interface is connected to Beijing Foreign Studies University
Router (config)#int g6/0
Router (config-if) # description To-Beijing University
Router (config-if) #
Configure interface bandwidth
Enter the interface configuration mode and use the bandwidth command to set the interface bandwidth in kbps
Router (config)#interface POS3/0
Router (config-if) # Banwidth 2500000 (set interface bandwidth to 2.5 Gbps)
Router (config-if) #
Configuration interface IP address
Enter the interface configuration mode and configure the ip address of the interface using the ip address command
Command format: ip address
Router (config)#interface f2/3
Router (config-if) # ip address 202.112.7.249 255.255.255.252
Router (config-if) #
Open and close of interface
Enter the interface configuration mode and use shutdown and no shutdown commands to close and open the interface:
Router (config)#interface f2/3
Router (config-if) # shutdown (close interface)
Router (config-if) #
Router (config-if) # no shutdown (open interface)
Router (config-if) #
LAN Interface Configuration
Configurable LAN interface types include Ethernet, FDDI, ATM and Token Ring. At present, Ethernet is the most widely used, so here only introduce several Ethernet standard interface configuration methods.
Configuration of standard Ethernet interface
The interface type of standard Ethernet is ethernet, which can be abbreviated as e
Router (config) #interface Ethernet0
Configuring Fast Ethernet Interface
The interface type of standard Ethernet is FastEthernet, which can be abbreviated as f.
Router (config) #interface f2/1
Configuration of Gigabit Ethernet Interface
The interface type of standard Ethernet is Gigabit Ethernet, which can be abbreviated as f.
Router (config) #interface g0/1
WAN Interface Configuration
Configuring Asynchronous Serial Interface
The interface type of asynchronous serial interface is Async, which can be abbreviated as a. Async interface is mainly used to connect Modem devices and provide dial-up Internet service for network users.
The Async interface configuration is as follows:
Router (config) #interface a1
Configuration of High Speed Synchronous Serial Interface
The interface type of high-speed synchronous serial interface is Serial, which can be abbreviated as s. Serial interface is mainly used for wide area network connection such as DDN dedicated line, frame relay, satellite, microblog, etc. Serial interface parameters need to be configured include interface bandwidth, interface protocol and interface IP address.
Router (config) #interface s1/1
Configuring POS interface
POS is the abbreviation of Packet over SONET/SDH, which uses SONET/SDH.
The technology of transmitting IP data packets directly through high-speed transmission channels is provided. The link layer protocols used by POS are mainly PPP and HDLC. The configuration parameters of POS interface include interface bandwidth, interface address, interface link layer protocol, interface frame format, interface CRC check and flag, etc.
In the global configuration mode:
Router(config)#interface POS3/0
Router(config-if)#description To TianJingDaXue
Router(config-if)#bandwidth 2500000
Router(config-if)#ip address 212.12.37.18 255.255.255.252
Router(config-if)#crc 32(The optional check bits are16and32)
Router(config-if)#pos framing sdh (The optional frame format is sdh and sonet)
Router(config-if)#no ip directed-broadcast
Router(config-if)#pos flag s1s0 2 (s1s0=00 Express is SONET Frame data)
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#exit
Router#
Configuration of loopback interface
Loopback interface is one of the most widely used virtual interfaces. The main function of loopback interface is that it acts as the management address of a router, so that network administrators can log on to the router at any time and manage the configuration of the router. It can also be used as router id of dynamic routing protocols OSPF and BGP to make routing function more stable and reliable. The network administrator assigns an IP address to the loopback interface as the management address, and its mask should be 255.255.255.255.255.
In the global configuration mode:
Router(config)# int loopback 0
Router(config-if)#ip address 192.167.167.6 255.255.255.255
Router(config-if)#no ip route-cache
Router(config-if)#no ip mroute-cache
Router(config-if)#exit
Router(config)#exit
Router#