Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip ?
<cr>
Router(config)#router rip
Router(config-router)#exit
Router(config)#router ospf ?
<1-65535> Process ID
Router(config)#router ospf 1
OSPF process 1 cannot start. There must be at least one "up" IP interface
Router(config-router)#exit
Router(config)#hostname R0
R0(config)#enable secret 112233 !设置特权模式登录密码
R0(config)#exit
R0>en !重新进入
Password:
R0#
R0(config)#line vty 0 4
R0(config-line)#pass
R0(config-line)#password 123456
R0(config-line)#login
R0(config-line)#exit
R0(config)#interface gigabitEthernet 0/0/0
R0(config-if)#ip address 192.168.1.1 255.255.255.0
R0(config-if)#no shut
R0(config-if)#end
R0#
%SYS-5-CONFIG_I: Configured from console by console
C:\>ping 192.168.1.1
Pinging 192.168.1.1 with 32 bytes of data:
Reply from 192.168.1.1: bytes=32 time<1ms TTL=255
Reply from 192.168.1.1: bytes=32 time<1ms TTL=255
Ping statistics for 192.168.1.1:
Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Control-C
^C
C:\>telnet 192.168.1.1
Trying 192.168.1.1 ...Open
User Access Verification
Password:
R0>en
Password:
R0#