08-05-2022 12:28 AM
hi
i want to configure my C3650 as a home router with dynamic IP address on gi0/1 and dynamic (Dhcp) on other ports 1-8. how can i do it in the best way?
current configuration is like this:
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
!
!
!
no aaa new-model
system mtu routing 1500
ip routing
!
!
!
Switch(config)#end
Switch#wr m
Building configuration...
[OK]
Switch#
*Mar 1 19:18:50.409: %SYS-5-CONFIG_I: Configured from console by console
Switch#sh ip int br | in Vlan
Vlan1 unassigned YES NVRAM administratively down down
Switch#sh run
Building configuration...
Current configuration : 2525 bytes
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
!
!
!
no aaa new-model
system mtu routing 1500
ip routing
!
!
!
Switch#sh run
Building configuration...
Current configuration : 2525 bytes
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
!
!
!
no aaa new-model
system mtu routing 1500
ip routing
!
!
!
!
crypto pki trustpoint TP-self-signed-2300671104
enrollment selfsigned
subject-name cn=IOS-Self-Signed-Certificate-2300671104
revocation-check none
rsakeypair TP-self-signed-2300671104
!
!
crypto pki certificate chain TP-self-signed-2300671104
certificate self-signed 01
3082023F 308201A8 A0030201 02020101 300D0609 2A864886 F70D0101 04050030
31312F30 2D060355 04031326 494F532D 53656C66 2D536967 6E65642D 43657274
69666963 6174652D 32333030 36373131 3034301E 170D3933 30333031 30303031
30335A17 0D323030 31303130 30303030 305A3031 312F302D 06035504 03132649
4F532D53 656C662D 5369676E 65642D43 65727469 66696361 74652D32 33303036
37313130 3430819F 300D0609 2A864886 F70D0101 01050003 818D0030 81890281
8100AAF7 6B5B497D 9CB9476C 6047A923 B6CCCE9E BFD19084 BF7344C0 728DC9EF
1C1C2004 05BD026C A3699699 6E7B67B5 B47ADB32 F12A8E11 547C5C1D 0FBCF76F
3DAD84C5 7B03DA4B D0F89ADB 01C16B94 47EC5684 1E58C7BF 0154C5AB 0FB0D343
BBE9A1D0 038372FB AC7C02CB ABA785F7 D1B31C52 8E1720B8 C5C27622 35C3933C
A7B90203 010001A3 67306530 0F060355 1D130101 FF040530 030101FF 30120603
551D1104 0B300982 07537769 7463682E 301F0603 551D2304 18301680 148D173E
E63BF449 E234F532 3DB243C0 A0263A1B E3301D06 03551D0E 04160414 8D173EE6
3BF449E2 34F5323D B243C0A0 263A1BE3 300D0609 2A864886 F70D0101 04050003
818100A3 E518378B 568EB518 47833CEE 9F73EF8E 6C80A4A1 936C393A EE2ED4F1
7AE635A0 F988037A D0B7F7B9 610F1741 4FAAD9CF B7CCD660 01CCA773 CC76D713
5581AC52 D122795C D425DFE5 5F66E657 4763AC30 DF92DA85 86C7F924 C2C4669B
AAD59CB8 A0BA0483 A8E20E2A 50E989E5 9B04FD5F B0D14A57 BACECA53 14AD2A42 5075D2
quit
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface GigabitEthernet0/1
switchport trunk encapsulation dot1q
switchport trunk native vlan 704
switchport mode trunk
!
interface Vlan1
ip address dhcp
shutdown
!
ip classless
ip http server
ip http secure-server
!
!
vstack
!
line con 0
line vty 0 4
login
line vty 5 15
login
!
end
08-08-2022 02:26 AM
1) move the "ip address dhcp" command to the Gi0/1 interface
(are you sure this needs to be a dot1q trunk interface ?)
you may consider configuring this interface as "no switchport"
2) create a new vlan with a vlan interface and assign it an internal Ip-address
and assign all internal ports to this vlan
3) create a dhcp scope for the internal vlan for a subnet containing the adress created in 2)
4) configure the Gi0/1 interface as nat outside end the new vlan interface as nat inside
you can find many configuration examples for this
08-08-2022 02:40 AM
the SW can not Do NAT so
sorry you still need Router
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide