| 36 | | (config)# vlan 1 |
| 37 | | (config-vlan)# name "Network" |
| 38 | | !(config-vlan)# exit |
| 39 | | }}} |
| 40 | | 2. Assign static IP address to the interface. we needed to find the switch's IP address |
| | 35 | (config)# vlan 2 |
| | 36 | (config-vlan)# exit |
| | 37 | (config)# interface gigabitethernet 0/5 |
| | 38 | (config-if)# switchport mode access |
| | 39 | (config-if)# switchport access vlan 2 |
| | 40 | (config-if)# exit |
| | 41 | (config)# interface vlan 2 |
| | 42 | (config-if)# ip address 10.1.0.1 255.255.0.0 |
| | 43 | (config-if)# exit |
| | 44 | }}} |
| | 45 | |
| | 46 | 2. Next, set up the VLAN and interface connected to the DHCP server. |
| 42 | | !(config-vlan)# interface vlan 1 |
| 43 | | !(config-if)# ip address 172.16.19.253 255.255.0.0 |
| 44 | | }}} |
| 45 | | 3. Configure ports to be trunk ports, then specify the native VLAN |
| 46 | | {{{ |
| 47 | | !(config)# interface gi 0/48 |
| 48 | | !(config-if)# switchport mode trunk |
| 49 | | !(config-if)# switchport trunk native vlan 1 |
| 50 | | }}} |
| 51 | | 4. Specify which VLANs are allowed on the trunk. This includes all VLANs that converge to this trunk, as well as the native VLAN for this trunk. If the port is already made to allow other VLANs, instead of using command `switchport trunk allowed vlan 1,3,27,28` you can just add VLAN 1 by using the `vlan add <vlan ID>` context: |
| | 48 | (config)# vlan 3 |
| | 49 | (config-vlan)# exit |
| | 50 | (config)# interface gigabitethernet 0/7 |
| | 51 | (config-if)# switchport mode access |
| | 52 | (config-if)# switchport access vlan 3 |
| | 53 | (config-if)# exit |
| | 54 | (config)# interface vlan 3 |
| | 55 | (config-if)# ip address 20.1.0.1 255.255.0.0 |
| | 56 | (config-if)# exit |
| | 57 | }}} |
| | 58 | |
| | 59 | 3. set the DHCP server's address as the helper address. |