admin 管理员组

文章数量: 887021

实验一. 路由器IP地址配置及直连网络

实验目的
  • 理解IP地址
  • 掌握路由器端口IP 地址的配置方法
  • 理解路由器的直连网络
实验步骤
  1. 布置拓扑,通过GigabitEthernet0/0/0端口连接192.168.1.0/24(手动改),通过GigabitEthernet0/0/1端口连接192.168.2.0/24(指令改)

    Router(config)#interface GigabitEthernet0/0/1
    Router(config-if)#ip address 192.168.2.254 255.255.255.0
    Router(config-if)#no shutdown
    

    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Y594mQwr-1649640381184)(D:\Typora\images\image-20220403165649158.png)]

  2. 查看路由表,C打头的是直连网络

    Router(config-if)#do 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, E - EGP
           i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
           * - candidate default, U - per-user static route, o - ODR
           P - periodic downloaded static route
    
    Gateway of last resort is not set
    
         192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
    C       192.168.1.0/24 is directly connected, GigabitEthernet0/0/0
    L       192.168.1.254/32 is directly connected, GigabitEthernet0/0/0
         192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
    C       192.168.2.0/24 is directly connected, GigabitEthernet0/0/1
    L       192.168.2.254/32 is directly connected, GigabitEthernet0/0/1
    
  3. 查看端口信息

    Router(config-if)#do show interface GigabitEthernet0/0/1
    GigabitEthernet0/0/1 is up, line protocol is up (connected)
      Hardware is ISR4331-3x1GE, address is 0090.21a5.e802 (bia 0090.21a5.e802)
      Internet address is 192.168.2.254/24
      MTU 1500 bytes, BW 1000000 Kbit, DLY 100 usec,
         reliability 255/255, txload 1/255, rxload 1/255
      Encapsulation ARPA, loopback not set
      Keepalive not supported
      output flow-control is on, input flow-control is on
      ARP type: ARPA, ARP Timeout 04:00:00, 
      Last input 00:00:08, output 00:00:05, output hang never
      Last clearing of "show interface" counters never
      Input queue: 0/375/0 (size/max/drops); Total output drops: 0
      Queueing strategy: fifo
      Output queue :0/40 (size/max)
      5 minute input rate 0 bits/sec, 0 packets/sec
      5 minute output rate 0 bits/sec, 0 packets/sec
         0 packets input, 0 bytes, 0 no buffer
         Received 0 broadcasts (0 IP multicasts)
         0 runts, 0 giants, 0 throttles
         0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
         0 watchdog, 1017 multicast, 0 pause input
         0 input packets with dribble condition detected
    
  4. 验证连通性

    从主机端使用ping命令来测试网络的连通性。

    发现没有ping通。

    这时我们给两台PC机加上网关

    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-1UdT4ZDC-1649640381186)(D:\Typora\images\image-20220403172249082.png)]

    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-UXndFezw-1649640381187)(D:\Typora\images\image-20220403172357338.png)]

    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-ZqdPUuLK-1649640381188)(D:\Typora\images\image-20220403172212667.png)]

学习体会
  • 理解IP地址
  • 掌握路由器端口IP 地址的配置方法
  • 理解路由器的直连网络
    片转存中…(img-ZqdPUuLK-1649640381188)]
学习体会
  • 理解IP地址
  • 掌握路由器端口IP 地址的配置方法
  • 理解路由器的直连网络
  • ping不通时可能是没有设置网关,信息就过不去

本文标签: 路由器 地址 网络 IP