使用外部电缆调制解调器配置 Cisco ISR 1861

网络工程 思科 纳特 调制解调器
2022-03-03 21:09:20

我以便宜的价格买了一台 1861,我正在尝试为家庭实验室设置它。我已经参加了 CCNP 的 Cisco 课程,我认为如果这只是一个普通的路由器或交换机,我会没事的,但我似乎无法使交换端口与路由器端口一起工作。

我正在尝试将外部电缆调制解调器连接到 F0/0。我已将其设置为 DHCP 以从有线电视公司获取 IP。

主机将连接到交换端口,包括在家庭网络上提供 DHCP 的服务器。

我的感觉是,我想将 F0/0 设置为外部 NAT 的 PAT 溢出,但我不知道如何在内部进行其他所有 NAT。或者我什至没有朝着正确的方向前进?

LAN 为 192.168.1.1/24 有线电视公司下一跳为 65.175.185.1

ip source-route
ip cef
!
!
!
!
!
no ip domain lookup
ip domain name larsson.local
no ipv6 cef
!
multilink bundle-name authenticated
!
!
interface Loopback0
 ip address 192.168.2.1 255.255.255.0
!
interface FastEthernet0/0
 ip address dhcp
 duplex auto
 speed auto
!
interface FastEthernet0/1/0
 switchport access vlan 99
!
interface FastEthernet0/1/1
 switchport access vlan 99
!
interface FastEthernet0/1/2
 switchport access vlan 99
!
interface FastEthernet0/1/3
 switchport access vlan 99
!
interface FastEthernet0/1/4
 switchport access vlan 99
!
interface FastEthernet0/1/5
 switchport access vlan 99
!
interface FastEthernet0/1/6
 switchport access vlan 99
!
interface FastEthernet0/1/7
 switchport access vlan 99
!
interface FastEthernet0/1/8
 switchport access vlan 99
!
interface Vlan1
 no ip address
!
router ospf 99
!
ip default-gateway 65.175.150.164
ip forward-protocol nd
ip http server
no ip http secure-server
!
!
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0
!
logging esm config
ipv6 route ::/0 FastEthernet0/0
!
!

任何帮助表示赞赏。

1个回答
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0
ipv6 route ::/0 FastEthernet0/0

永远不要那样做。那是代理arp。太多的人在线索的情况下这样做……这不是需要强制启动的拨号界面。

router ospf 99

你和谁交换路线?您不需要运行 OSPF。就此而言,您不需要在 vlan 99 中拥有所有交换机接口。

ip default-gateway 65.175.150.164

这是一个主机模式命令。它在路由器上什么都不做。

首先,确保启用了路由:(ip routing这是默认设置,因此通常不会在配置中显示)其次,枚举内部和外部接口,以及应该设置的内容:

int f0/0
  ip nat outside
int vlan99
  ip address 192.168.1.1 255.255.255.0
  ip nat inside
!
ip nat inside source list nat-acl interface f0/0 overload
!
ip access-list standard nat-acl
  permit 192.168.1.0 0.0.0.255

然后配置DHCP:

ip dhcp pool lan
   network 192.168.1.0 255.255.255.0
   default-router 192.168.1.1
   domain-name my-domain.local
   dns-server 8.8.8.8 8.8.4.4
   lease 0 1