静态路由配置

这是单纯学习笔记,你可能得不到任何有用的东西

1.配置静态路由
ip route 目的网段 子网掩码 下一跳路由器的IP地址

Route(config)# ip route 172.16.1.0 255.255.255.0 172.16.2.1

2.静态路由的删除

Route(config)#no ip route 目的网段 子网掩码 下一跳路由器的IP地址

3.默认路由

Route(config)# ip route 0.0.0.0 0.0.0.0 [转发路由器的IP地址/本地端口]

4.路由器端口IP配置

Route(config-if)# ip address IP地址 子网掩码

5.查看路由表

show ip route
Codes: 	C -connected, S -static, R -RIP, B -BGP
	O -OSPF, IA -OSPF inter area
	N1 -OSPF NSSA external type 1, E2 -OSPF NSSA external type 2
	E1 -OSPF external type 1, E2 -OSPF external type 2
	i -IS-IS,su-IS-IS summary,L1-IS-IS level-1,L2-IS-IS level-2
	ia-IS-IS inter area,* -candidate default
Gateway of last resort is no set
①C	192.168.1.0/24 is directly connected, FastEthernet 0/1
②C	192.168.1.1/32 is local host.
③C	192.168.2.0/24 is directly connected, serial 2/0
④C	192.168.2.1/32 is local host
⑤S	192.168.3.0/24 [1/0] via 192.168.2.2
show ip interface brief
Interface		IP-Address(Pri)		IP-Adress(Sec)		Status		Protocol

Serial 2/0		
SIC-3G-WCDMA 3/0	
GigabitEthernet 0/0	
GigabitEthernet 0/1	
VLAN 1			
show interface serial 2/0
index(dex):2 (hex)2
Serial 2/0 is UP , line protocol is UP
Hardware is STC-1HS HDLC CONTROLLER Serial
Interface address is: no ip address
 MTU 1500 bytes, BW 2000 Kbit
 Encapsulation protocol is HDLC, loopback set
 Keepalive interval is 10 sec ,retries 3.
 Carrier delay is 2 sec
 Rxload is 1/255, Txload is 1/255
 Queueing strategy: FIFO
  Output queue 0/40, 0 drops:
  Input queue 0/75, 0 drops
  0 carrier transitions
  V35 DCE cable
  DCD=down DSR=up DTR=down RTS=up CTS=up
5minutes input rate 16 bits/sec, 0packets/sec
5minutes output rate 19 bits/sec, 0packets/sec
  8555 packets input, 205320 bytes, 0 no buffer, 0 dropped
  Received 0 broadcasts, 0 runts, 0 giants
  0 input errors, 0 CRC, 0 frame, 0 overrun, 0 dropped
  8556 packets output, 205344 bytes, 0 underruns, 0dropped
  0 output errors, 0collisions, 0 interface resets
show running-config

Building configuration...
current configuration : 1835 bytes

!
version RGOS 10.4(3b23) Release(176514)(Mon Jul 28 18: 19:31 CST 2014 -ngcf62)
hostname 19-RSR20-1
webmaster level 0 username admin password 7 0242473a1108
!
!
!
!
!
!
diffserv domain default
!
!
!
!
cwmp
!
!
!
!
!
!
vlan 1
!
!
no service password-encryption
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
control-plane
!
control-plane protocol
 no acpp
!
control-plane manage
 no port-filter
 no arp-car
 no acpp
!
control-plane data
 no glean-car
 no acpp
!
!
!
!
enable service web-server http
enable service web-server https
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Serial 2/0
 encapsulation HDLC
 clock rate 64000
!
interface FastEthernet 1/0
!
interface FastEthernet 1/1
!
interface FastEthernet 1/2
!
interface FastEthernet 1/3
!
interface FastEthernet 1/4
!
interface FastEthernet 1/5
!
interface FastEthernet 1/6
!
interface FastEthernet 1/7
!
interface FastEthernet 1/8
!
interface FastEthernet 1/9
!
interface FastEthernet 1/10
!
interface FastEthernet 1/11
!
interface FastEthernet 1/12
!
interface FastEthernet 1/13
!
interface FastEthernet 1/14
!
interface FastEthernet 1/15
!
interface FastEthernet 1/16
!
interface FastEthernet 1/17
!
interface FastEthernet 1/18
!
interface FastEthernet 1/19
!
interface FastEthernet 1/20
!
interface FastEthernet 1/21
!
interface FastEthernet 1/22
!
interface FastEthernet 1/23
!
interface GigabitEthernet 0/0
 duplex auto
 speed auto
!
interface GigabitEthernet 0/1
 duplex auto
 speed auto
!
interface VLAN 1
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ip route 172.16.1.0 255.255.255.0 172.16.2.1
!
!
!
!
!
ref parameter 75 140
line con 0
line aux 0
line tty 1
 modem InOut
line vty 0 4
 login
 password b402
!
!
end

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值