0x0 拓扑图

  • 要求
    1. 内网的PC1需要DHCP服务获取地址,DHCP服务器为AR2
    • 地址池为192.168.1.0/24这个网段
      1. 内网设备的本地域名服务器地址为20.20.20.20
      2. DNS服务器server2中的地址映射为www.lcy.com -> 30.30.30.30
      3. HTTP服务器和FTP服务器都由server1提供

0x1 配置指令

  • LSW1
    undo stp enable //关闭stp服务防止链路上充斥着过多的STP包
    
  • AR1
    dhcp enable
    interface GigabitEthernet0/0/0
     ip address 192.168.1.1 255.255.255.0 
     dhcp select relay
     dhcp relay server-ip 10.10.10.10
    interface GigabitEthernet0/0/1
     ip address 192.168.2.1 255.255.255.252 
    ospf 1 
     area 0.0.0.0 
    network 192.168.1.1 0.0.0.0 
    network 192.168.2.1 0.0.0.0 
    
  • AR3
    dhcp enable
    interface GigabitEthernet0/0/0
     ip address 192.168.2.2 255.255.255.252 
    interface GigabitEthernet0/0/1
     ip address 30.30.30.1 255.255.255.0 
    interface GigabitEthernet0/0/2
     ip address 20.20.20.1 255.255.255.0 
    interface GigabitEthernet4/0/0
     ip address 10.10.10.1 255.255.255.0 
     dhcp select relay
     dhcp relay server-ip 10.10.10.10
    ospf 1 
     area 0.0.0.0 
    network 10.10.10.0 0.0.0.255 
    network 20.20.20.0 0.0.0.255 
    network 30.30.30.0 0.0.0.255 
    network 192.168.2.2 0.0.0.0 
    
  • AR2
    dhcp enable
    ip pool dhcp1
     gateway-list 192.168.1.1 
     network 192.168.1.0 mask 255.255.255.0 
     dns-list 20.20.20.20
    interface GigabitEthernet0/0/0
     ip address 10.10.10.10 255.255.255.0 
     dhcp select global
    ospf 1 
     area 0.0.0.0 
    network 10.10.10.10 0.0.0.0 
    
  • server2 DNS服务器配置

0x2 连通性测试

  • PC1获取DHCP地址
  • Client1访问Server1的FTP服务
  • Client1访问Server1的HTTP服务