Preparation of the device configuration
Modify the session timeout, set to never time out.
Router (config) #line console 0Router (config-line) #exec-timeout 0 0
Prevents the console from automatically displaying information that can be enabled for display synchronization.
Router (config) #line console 0Router (config-line) #logging synchronous
disabling DNS queries
Router (config) #no IP domain-lookup
Show all commands that are currently routed
Router#show Running-config
Configuring IP addresses for routing
Router (config) #interface fastethernet 0/0router (config-if) #ip address 192.168.1.1 255.255.255.0Router (config-if) #no Shutdown \ \ Open Routing interface
Configure IP addresses for the switch
Switch (config) #interface vlan 1Switch (config-if) #ip address 192.168.1.1 255.255.255.0Switch (config-if) #no shutdown
Configuration instance
The f0/0 of the router and the F0/1 of the switch are connected to each other through the console port of the PC connection device to configure the device IP address.
650) this.width=650; "title=" Qq20150607180639.png "src=" http://s3.51cto.com/wyfs02/M00/6E/1F/ Wkiom1v0f8pw3ckraal7uy1rih8766.jpg "alt=" Wkiom1v0f8pw3ckraal7uy1rih8766.jpg "/>
router>enrouter>enablerouter#confrouter#configurerouter#configure terminalEnter configuration commands, one per line. End with Cntl/z.router (config) #intRouter (config) #interface frouter (config) #interface fastethernet 0/ 0Router (config-if) #ip addrouter (config-if) #ip address 192.168.1.1 255.255.255.0router ( CONFIG-IF) #no shrouter (config-if) #no shutdownrouter (config-if) #%link-5-changed: interface Fastethernet0/0, changed state to up%lineproto-5-updown: line protocol on interface fastethernet0/0, changed state to up
switch>enswitch>enableswitch#confswitch#configureswitch#configure terminalEnter configuration commands, one per line. End with Cntl/z.switch (config) #Switch (config) #intSwitch (config) #interface vswitch (config) #interface vlan 1switch (config-if) #ip addswitch (config-if) #ip address 192.168.1.2 255.255.255.0Switch (config-if) #no sswitch (config-if) #no shswitch (config-if) #no shutdownswitch ( CONFIG-IF) #%link-5-changed: interface vlan1, changed state to up% Lineproto-5-updown: line protocol on interface vlan1, changed state to up
Router#router#ping 192.168.1.2Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:.!!! Success rate is percent (3/5), round-trip Min/avg/max = 0/0/1 ms
The interface can be viewed in the event of an error
Router#show interfaces f0/0fastethernet0/0 is up, line protocol is up (connected) hardware is lance, address is 0010.11e3.ec01 (bia 0010.11E3.EC01) internet address is 192.168.1.1/24mtu 1500 bytes, bw 100000 kbit, dly 100 usec,reliability 255/255, txload 1/255, rxload 1/ 255encapsulation arpa, loopback not setarp type: arpa, arp timeout 04:00:00,last input 00:00:08, output 00:00:05, output hang neverlast clearing of "Show interface" counters neverInput queue: 0/75/0 ( Size/max/drops); total output drops: 0queueing strategy: fifooutput queue :0/40 (Size/max) 5 minute input rate 4 bits/sec, 0 packets/sec5 minute output rate 7 bits/sec, 0 packets/sec3 packets input, 384 bytes, 0 No bufferreceived 0 broadcasts, 0 runts, 0 giants, 0 throttles0 input errors, 0 crc, 0 frame, 0 overrun, 0 ignored, 0 abort0 input packets with dribble condition detected4 packets Output, 512 bytes, 0 underruns0 output errors, 0 collisions, 1 interface resets0 babbles, 0 late collision, 0 deferred0 lost carrier, 0 no carrier--more--
This article is from the "arlies" blog, make sure to keep this source http://arlies.blog.51cto.com/10292766/1659443
Basic configuration of the router