# subnetting a /24 Network(200.200.200.*)
# /27 = 255.255.255.224(.11100000)
# 最多可以分成8個子網路,一個子網路30個hosts
# 左
interface gigabitEthernet 0/0
ip address 200.200.200.62 255.255.255.224
no shutdown
interface gigabitEthernet 0/1
ip address 200.200.200.94 255.255.255.224
no shutdown
interface gigabitEthernet 0/2
ip address 200.200.200.1 255.255.255.224
no shutdown
# 200.200.200.96(.01100000), 200.200.200.128(.10000000)
ip route 200.200.200.96 255.255.255.224 200.200.200.2
ip route 200.200.200.128 255.255.255.224 200.200.200.2
# 右
interface gigabitEthernet 0/0
ip address 200.200.200.126 255.255.255.224
no shutdown
interface gigabitEthernet 0/1
ip address 200.200.200.158 255.255.255.224
no shutdown
interface gigabitEthernet 0/2
ip address 200.200.200.2 255.255.255.224
no shutdown
# .32(.00100000)(.32~.63)
# (.32為網段 All 0s (binary) : Network segment)
# (.62當default gateway)
# (.63當All 1s (binary) : Broadcast address)
# 可用ip: .33~.62, 30個hosts
ip route 200.200.200.32 255.255.255.224 200.200.200.1
# .64(.01000000)
# 可用ip: .65~.94
ip route 200.200.200.64 255.255.255.224 200.200.200.1
# PC 0
IP Address: 200.200.200.33
Subnet Mask: 255.255.255.224
Default Gateway: 200.200.200.62
# 最後設密碼
conf t
line console 0
password 123
login
conf t
enable secret 123