Cisco交换机查看路由表

  • Cisco查看路由表:show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
       n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       H - NHRP, G - NHRP registered, g - NHRP registration summary
       o - ODR, P - periodic downloaded static route, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is 192.168.5.1 to network 0.0.0.0

常见代码:L - 本地,C - 直连,S - 静态,R - RIP,B - BGP, D - EIGRP, O - OSPF, i - IS-IS

缺省路由:到网络 0.0.0.0 最后的网关是 192.168.5.1 

S*    0.0.0.0/0 [1/0] via 192.168.5.1
      192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.3.0/24 is directly connected, Vlan3
L        192.168.3.1/32 is directly connected, Vlan3
      192.168.4.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.4.0/30 is directly connected, Vlan4
L        192.168.4.1/32 is directly connected, Vlan4
      192.168.5.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.5.0/30 is directly connected, Port-channel1
L        192.168.5.2/32 is directly connected, Port-channel1


S* 0.0.0.0/0 [1/0] 通过 192.168.5.1
      192.168.3.0/24 子网可变,2 个子网,2 个子网掩码
C 192.168.3.0/24 是直连网段,通过 Vlan3 转发到192.168.3.0/24 
L 192.168.3.1/32 是直连网段(子网掩码32位,是该网段的网关,是一个具体的IP地址),通过 Vlan3 转发到192.168.3.1/32 
      192.168.4.0/24 是可变子网,2 个子网,2 个子网掩码
C 192.168.4.0/30 是直连网段,通过 Vlan4 转发到192.168.4.0/30
L 192.168.4.1/32 是直连网段(子网掩码32位,是该网段的网关,是一个具体的IP地址),通过 Vlan4 转发到192.168.4.1/32
      192.168.5.0/24 是可变子网,2 个子网,2 个子网掩码
C 192.168.5.0/30 是直连网段,通过  汇聚端口1 转发到192.168.5.0/30
L 192.168.5.2/32 是直连网段(子网掩码32位,是该网段的网关,是一个具体的IP地址),通过  汇聚端口1 转发到192.168.5.2/32
  • 查看路由表概括性(汇总)信息:show ip route summary
9300#show ip route summary
IP routing table name is default (0x0)·
IP routing table maximum-paths is 32
Route Source     Networks    Subnets     Replicates  Overhead    Memory (bytes)
connected        0           226         0           21696       70512
static           1           0           0           96          312
internal         85                                              57080
Total            86          226         0           21792       127904

路由表名字是默认的
路由表最长路径为32跳
路由源            网络         子网        复制的路由    开销         内存(字节)
直连              0           226         0           21696       70512
静态              1           0           0           96          312
内部(OSPF内部)   85                                              57080
总计              86          226         0           21792       127904
  • 按照更细致的划分进一步查看路由表信息:show ip route ?
9300#show ip route ?
  Hostname or A.B.C.D  Network to display information about or hostname
  application          Application routes
  bgp                  Border Gateway Protocol (BGP)
  connected            Connected
  dhcp                 Show routes added by DHCP Server or Relay
  eigrp                Enhanced Interior Gateway Routing Protocol (EIGRP)
  isis                 ISO IS-IS
  lisp                 Locator ID Separation Protocol (LISP)
  list                 IP Access list
  loops                RIB routes forming loops
  mobile               Mobile routes
  multicast            Multicast global information
  nat-route            Network Address Translation (NAT) Route
  next-hop-override    Show next-hop-overrides too
  nhrp                 Next Hop Resolution Protocol (NHRP)
  odr                  On Demand stub Routes
  omp                  Overlay Management Protocol
  omp-tag              Route OMP Tag
  ospf                 Open Shortest Path First (OSPF)
  ospfv3               OSPFv3
  profile              IP routing table profile
  repair-paths         Show repair paths too
  rip                  Routing Information Protocol (RIP)
  secondary            Show secondary nexthops too
  static               Static routes
  summary              Summary of all routes
  supernets-only       Show supernet entries only
  tag                  Route Tag
  topology             Display routes from a topology instance
  track-table          Tracked static table
  vrf                  Display routes from a VPN Routing/Forwarding instance
  |                    Output modifiers
  <cr>                 <cr>
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

清梦daydream

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值