|
Cisco router príkazy |
Zoznam niektorých základných príkazov v príkladoch
| Basic Router Operations | |
| Prechod do priveledge mode | enable |
| Prechod do user mode | disable |
| exit router | exit or logoff |
| Predošlí Command | up arrow or ctl-p |
| Ďaľší Command | down arrow or ctl-n |
| Move forward one character | right arror or ctl-f |
| Move backward one character | left arrow or ctl-b |
| Move forward jedno slovo | Esc f |
| Move backward jedno slovo | Esc b |
| Break Key | <shft>+<ctl>+6 'x' |
| Auto complete command | <tab> |
| Refresh screen output | <Ctrl-R> |
| Viewing Router Information | |
| IOS version info | show version |
| current config (ram) | show running-config |
| saved config (nvram) | show startup-config |
| IOS file and free space | show flash |
| processor utilization | show processes cpu |
| Configuring the Router | |
| Configuring from the terminal session (keyboard) to running (ram) | Configure terminal Configure memory kopíruje conf súbor uložený v NVRAM späť do running configuration. Obnoví uloženú konfiguráciu ale NEVYMAŽE pridané riadky. Na kompletnú obnovu treba reloadovat router. Configure network umožní načítať konfiguračný súbor s TFTP (Trivial File Transfer Protocol) servera a nakopírovať ho do running configuration. postup prepisu je obdobný ako pri prepise Conf mem |
| from tftp (file server) to running (ram) | copy tftp running-config |
| from saved config (nvram) to running (ram) | copy startup-config running-config |
| Upgrade the IOS from file server | copy tftp flash |
| save backup copy of IOS to file server | copy flash tftp |
| Save your configuration (from ram) to non-volatile (nvram) | copy running-config startup-config |
| Tell the router which IOS file in Flash to boot from | boot system flash {filename} |
| Tell the router which IOS file to request from tftp (fallback) | boot system tftp {filename} |
| Set clock | clock set 13:32:00 23 June 2007 |
| Passwords | |
| set password for connecting through console port | line console 0 login password cisco |
| Set password for Telnet | line vty 0 4 login password mojeheslo |
| Set password for priveledge mode | enable password cisco |
| Set encrypted password for priveledge mode | enable secret cisco |
| Konfigurácia základných parametrov routra | |
| ip domain list ukf.sk | |
| no ip domain lookup | |
| ip domain name ukf.sk | |
| ip name-server 193.87.12.90 | |
| Konfigurácia DHCP servra | |
| RFC 951, Bootstrap Protocol (BOOTP) | Router(config)#
ip dhcp excluded-address low-address [high-address] |
| RFC 1542, Clarifications and Extensions for the Bootstrap Protocol | Router(config)#
ip dhcp pool nazov |
| RFC 2131, Dynamic Host Configuration Protocol | Router(config-dhcp)# network 192.168.250.0 255.255.255.0 |
| RFC 2132, DHCP Options and BOOTP Vendor Extensions | Router(config-dhcp)#
domain-name ukf.sk |
| DNS1 a DNS2 | Router(config-dhcp)#
dns-server 193.87.12.26 193.87.12.100 |
| WINS | Router(config-dhcp)# netbios-name-server 193.87.12.27 |
| Gateway | Router(config-dhcp)#
default-router 192.168.250.1 |
| default je 1 deň | Router(config-dhcp)# lease {days [hours][minutes]|
infinite} |
| default je 1 deň | Router(config-dhcp)#option code [podla RFC napr.72-WWW] {ascii string | hex string | ip address} |
| Priradenie IPky a mena na MAC adresu, pre kazdy pc zvlášť | Router(config)#
ip dhcp pool MenoPC |
Router(config-dhcp)#
host address
[mask
| /prefix-length] |
|
Router(config-dhcp)#
hardware-address 0dc7.fa0a.0412
type |
|
Router(config-dhcp)# client-name MenoPC |
|
| zapnutie služby ak by bola down (default je up) | Router(config)#
service dhcp |
| kontrola konfiguracie | show dhcp Config |
| Konfigurácia DHCP klienta | |
Router(config)#interface fa 0/1 |
|
Router(config-if)#ip address dhcp |
|
| Configuring Interface | |
| Serial Interface | |
| je interface DCE alebo DTE? | show controller serial 0 |
| from global config | Router(config)# interface serial 0 |
| set clock rate na DCE v bits per second (clock rate bps) |
Router(config-if)#clock rate 384000 |
Router(config-if)#description 384 Kbps leased line to Blava |
|
Router(config-if)#ip address 209.135.17.3 255.255.255.252 |
|
Router(config-if)#bandwidth 384 |
|
Router(config)#interface Serial0:1 |
|
Router(config-if)#description 64 Kbps leased line to Pentagon |
|
Router(config-if)#ip address 209.135.17.9 255.255.255.252 |
|
Router(config-if)#bandwidth 64 |
|
| Loopback Interface | |
| from global config | Router(config)#interface Loopback0
|
| FastEthernet Interface | |
| from global config | Router(config)#interface FastEthernet0/0 |
Router(config-if)#mtu 1500 | |
| BRI 0 Interface | |
| from global config | Router(config)#interface BRI 0 |
| konfigurica voice modulu k pripojeniu ISDN telefonu | |
| no ip address | |
| isdn switch-type basic-net3 | |
| nastavenie L1 ako master (network) - udáva časovanie | isdn layer1-emulate network |
| nastavenie L2 ako master (network) - udáva časovanie | isdn protocol-emulate network |
| konfigurica voice modulu k pripojeniu PBX | |
| no ip address | |
| isdn switch-type basic-net3 | |
| zasielanie cisla pri nadviazani | isdn overlap-receiving |
| isdn not-end-to-end 64 | |
| isdn protocol-emulate network | |
| isdn layer1-emulate network | |
| isdn incoming-voice voice | |
| isdn send-alerting | |
| isdn sending-complete | |
| isdn outgoing-voice info-transfer-capability 3.1kHz-audio | |
| point to point, fixne nastavená 0, žiadne vyjednávanie | isdn static-tei 0 |
| isdn skipsend-idverify | |
| konfigurácia pre dial záložný isdn interface | |
| nastavenie na LAN interface | ip unnumbered FastEthernet0/0 |
| encapsulation ppp | |
| dialer pool-member 10 | |
| isdn switch-type basic-net3 | |
| ppp authentication pap | |
| Vlan1 Interface | |
| from global config |
Router(config)#interface Vlan1
|
| MPLS Interface | |
| from global config |
Router(config)#interface Multilink1
|
Router(config)#interface Dialer1 | |
Router(config-if)#ip address negotiatedd | |
Router(config-if)#ip mtu 1492 | |
Router(config-if)#encapsulation ppp | |
Router(config-if)#ppp
authentication pap|chap|eap|ms-chap|ms-chap-v2
callin|callout|callback | |
Router(config-if)#ppp pap
sent-username user
password password | |
Router(config-if)#dialer pool 1 | |
Router(config-if)#dialer remote-name Zaloha | |
Router(config-if)#dialer idle-timeout 900 | |
Router(config-if)#dialer load-threshold 80 outbound | |
| dialer-group 1 | |
| ppp authentication chap | |
Router(config)#
dialer-list 1 protocol ip list 100 | |
Router(config)# interface Dialer 1 | |
| ip unnumbered Ethernet0 | |
| encapsulation ppp | |
| peer default ip address pool mypool | |
| dialer in-band | |
| dialer idle-timeout 600 | |
| dialer-group 1 | |
| compress stac | |
| ppp authentication pap chap | |
| ppp multilink | |
| Interface parameters | |
| set the bandwidth | description popis |
| set the bandwidth | bandwidth 64 |
| enable the interface | no shutdown |
| Check interface status | show interface serial 1 show ip interface brief |
| Cisco Discovery Protocol | |
| see directly connect neighbors dodatok 'detail' pre viac info | show cdp neighbor |
| see which inteface are running cdp | show cdp interface |
| see one neighbors detail | show cdp entry P1R1 |
| Turn off CDP for whole router (from global config) | no cdp run |
| turn off cdp on an interface | no cdp enable |
| change how often you send cdp info | cdp timer 120 |
| change how long you will til you remove a cdp neighbor | cdp holdtime 240 |
| TCP/IP | |
| Disable IP routing on the router (enabled by default) | no ip routing |
| to put an ip address on an interface | interface serial 0 ip address 157.89.1.3 255.255.0.0 ip address 199.53.4.1 255.255.255.0 secondary interface ethernet 0 ip address 208.1.1.4 255.255.255.0 |
| Configure RIP | router rip network 157.89.0.0 network 208.1.1.0 |
| Configure IGRP | router IGRP 200 network 157.89.0.0 network 208.1.1.0 |
| view ip routing table | show ip route |
| view rip debug stuff | debug ip rip |
| view igrp debug stuff | debug ip igrp events debug ip igrp transactions |
| IPX/SPX | |
| Enable IPX on the router (disabled by default) | ipx routing |
| Enable Load balancing | ipx maximum-paths 6 |
| Interface Commands | |
| enable IPX on an interface | interface serial 0 |
| -- default encapsulation | ipx network 4A |
| --- defaults to novell-ether on ethernet, HDLC on serial | |
| TO FORCE ENCAPSULATION TYPE: | |
| -- 802.3 encap | ipx network 4A encap novell-ether |
| -- 802.2 encapsulation | ipx network 4A encap sap |
| -- Ethernet II encapsulation | ipx network 4A encap arpa |
| -- Snap Encapsulation | ipx network 4A encap snap |
| IPX Rip routing is automatically enabled as soon as you
put an IPX address on an interface Show Commands |
|
| view ipx routinng table | show ipx route |
| view ipx address on an interface | show ipx interface |
| view SAP table | show ipx servers |
| view traffic statistics | show ipx traffic |
| Debug Commands | |
| debug IPX RIP Packets | debug ipx routing activity |
| debug SAP packets | debug ipx sap |
| Appletalk | |
| Enable appletalk on the router (disabled by default) | appletalk routing |
| Interface commands | |
| specify routing protocol (default to RTMP) -- optional | appletalk protocol eigrp appletalk protocol aurp |
| Assign a cable range to an interface (required) | appletalk cable-range 1000-1999 |
| Assign a zone to an interface (required) | appletalk zone Workgroup1 |
| Put interface into discovery mode, it will find range & zone | appletalk cable-range 0-0 or appletalk discovery |
| Show Commands | |
| View the appletalk address on an interface | show appletalk interface serial 0 |
| View the appletalk routing table | show appletalk routing |
| View appletalk zones | show appletalk zones |
| Show Global appletalk settings | show appletalk globals |
| Access-Lists | |
| All Access-List numbered ranges | |
| <1-99> | IP standard access list |
| <100-199> | IP extended access list |
| <200-299> | Protocol type-code access list (Ethernet type code, Transparent bridging (protocol type)) |
| <300-399> | DECnet access list |
| <400-509> | XNS standard access list |
| <500-599> | XNS extended access list |
| <600-699> | Appletalk access list |
| <700-799> | 48-bit MAC address access list (Transparent bridging (vendor code)) |
| <800-899> | IPX standard access list |
| <900-999> | IPX extended access list |
| <1000-1099> | IPX SAP access list |
| <1100-1199> | Extended 48-bit MAC address access list (Extended transparent bridging) |
| <1200-1299> | IPX summary address access list |
| 1 to 100 | Standard VINES |
| 101 to 200 | Extended VINES |
| 201 to 300 | Simple VINES |
| View Which Access-lists are applied to which interface | show ip interface serial 0 show ipx interface serial 0 show appletalk interface serial 0 |
| View the access-lists | show access-lists show ip access-lists show ipx access-lists show appletalk access-lists |
| Access-Lists, IP Standard = 1-99, filter on Source address | |
| Goal- stop subnet 200.1.1.0 255.255.255.0 from sending packets into ethernet 0 | |
| A. Deny the subnet | access-list 1 deny 200.1.1.0 0.0.0.255 |
| B. Implicit deny all, so must permit others | access-list 1 permit any |
| C. Doesn't do anything until we bind it to an interface | interface ethernet 0 ip access-group 1 in |
| Access-Lists, IP Extended = 100-199, filter on Source + Dest, Port, etc… | |
| Goal - stop host 1.1.1.1 from telneting out e0 going to host 2.2.2.2 and stop subnet 3.3.3.0 from web surfing anywhere | |
| A. Remember access-list # source destination options | access-list 100 deny tcp host 1.1.1.1 host 2.2.2.2 eq 23 |
| B. Stop that web surfing | access-list 100 deny tcp 3.3.3.0 0.0.0.255 any eq 80 |
| C. Implicit deny, allow all others | access-list 100 permit ip any any access-list 100 deny icmp any any |
| D. Doesn't do anythin, until you bind it to an interface | interface ethernet 0 ip access-group 100 out ip access-group 100 in |
| Named IP/IPX Access-Lists | |
| Allows editing of lines instead of deleting entire list | ip access-list standard cool_list |
| supports standard and extended | deny 1.1.1.1 |
| (Named IP requires 11.2 or later) | permit any |
| (Named IPX requires 11.3 or later) | interface ethernet 0 ip access-group cool_list in |
| Access-Lists, IPX Standard = 800-899, filter Source & Dest | |
| Stop network 7A from getting to network 8000 | access-list 800 deny 7a 8000 |
| implicit deny all, allow all other networks | access-list 800 permit -1 |
| Doesn't do anything until you bind it to an interface | interface ethernet 0 ipx access-group 800 out |
| Access-Lists, IPX Extended = 900-999, filter on Source & Dest + Socket, etc… | |
| Stop SAPs on socket 3378 from all networks to all networks | access-list 900 deny sap any 3378 -1 |
| implicit deny all, allow all other SAPs | access-list 900 permit sap any all -1 |
| Doesn't do anything until you bind it to an interface | interface ethernet 0 ipx access-group 900 out |
| Access-Lists, IPX SAP Filters = 1000-1099, filter on Source, Port, Service Name | |
| Stop SAPs from server 1 from coming in Ethernet 0 | access-list 1000 deny 7A.0000.0000.0001 4 |
| Permit all others | access-list 1000 permit -1 |
| Bind it to an itnerface | interface ethernet 0 |
| stop it coming in | ipx input-sap-filter 1000 |
| or stop it going out | ipx output-sap-filter 1000 |
| Access-Lists, Appletalk = 600-699, filter on Cable-Range & Zone | |
| Deny cable range 1000-1999 | access-list 600 deny cable-range 1000-1099 |
| permit all other cable ranges | access-list 600 permit other-access |
| deny the zone Workgroup1 | access-list 600 deny zone Workgroup1 |
| permit all other zones | access-list 600 permit additional-zones |
| Bind it to an itnerface | interface ethernet 0 appletalk access-group 600 |
| PPP | |
| Interface commands | |
| Enable PPP on the interface | encapsulation ppp |
| Enable authentication (chap or pap) | ppp authentication chap |
| specify chap hostname (defaults to router name) | ppp chap hostname MyRouter |
| Specify chap password (defaults to enable password) | ppp chap password Clearwater |
| Specify pap username | ppp pap sent-username MackoUsko |
| Global Commands | |
| Create a username and password for logging in | username OtherRouter password Skywalker |
| Show Commands | |
| See encapsulation, open LCP's and more | show interface serial 0 |
| Debug Commands | |
| View the authentication process | debug ppp authentication |
| X.25 | |
| Interface commands | |
| Enable X.25 on an interface and specify encap type | encapsulation x25 ietf |
| specify YOUR x121 address | x25 address 301222333444 |
| Map the OTHER IP to OTHER x121 address (global) | |
| enable broadcasts for RIP & such | x25 map ip 200.1.1.1 301999888777 broadcast |
| OPTIONAL Interface commands | |
| Adjust Incoming Packet Size, must match on both sides | x25 ips 512 |
| Adjust Outgoing Packet Size, must match on both sides | x25 ops 512 |
| Adjust Incoming Windows Size, must match on both sides | x25 win 7 |
| Adjust Outgoing Window Size, must match on both sides | x25 wout 7 |
| Show Commands | |
| View Encapsulation, LAPB Status, & more | View Encapsulation, LAPB Status, & more show interface serial 0 |
| Back-to-Back x25 routers | |
| Note, x25 does not care about which ONE router has DCE cable | |
| Enable X.25 on interface and specify encap type + ONE side is DCE | encapsulation x25 dce ietf |
| Set DCE-side to transmit clocking frequency in Kbits/Sec | clockrate 9600 |
| Frame-Relay | |
| Interface commands | |
| Enable Frame-Relay on an interface and specify encap type | encapsulation frame-relay ietf |
| Specify LMI Type (11.2+ will autosense LMI type) | frame-relay lmi-type ansi |
| If Inverse ARP won`t work, Map OTHER IP to YOUR DLCI # (local) | frame-relay map ip 3.3.3.3 100 broadcast |
| can also allow boradcast and specify encap type | |
| Define local DLCI (in LMI not working) | frame-relay local-dlci 100 |
| Adjust keepalive period | keepalive 10 |
| Show Commands | |
| View DLCI & LMI Info | show interface serial 0 |
| View PVC traffic statistics | show frame-relay pvc |
| View Route Maps (static or dynamic) | show frame-relay map |
| View LMI info | show frame-relay lmi |
| Back-to-Back frame-relay routers | |
| Note, must match DCE-side router commands with DCE cable | |
| Enable Frame-Relay switching on DCE-side router | frame-relay switching |
| Tell DCE-side to support DCE frame-relay functions on what interface | frame-relay intf-type dce |
| Tell DCE-side which interface & DLCI to switch current interface to | frame-relay route {dlci} interface {int} {dlci} |
| Set DCE-side to transmit clocking frequency in Kbits/Sec | clockrate 64000 |
| Config-Reg | |
| RXBOOT (diagnostics mode, use 'b' to continue booting) | config-reg 0x2000 |
| Boot to ROM, use NVRAM (upgrade flash in run-from-flash routers) | config-reg 0x2101 |
| Boot to ROM, skip NVRAM (disaster recovery) | config-reg 0x2141 |
| Boot to Flash, use NVRAM (normal operation) | config-reg 0x2102 |
| Boot to Flash, skip NVRAM (password recovery) | config-reg 0x2142 |
| Auto-Install | |
| Router broadcasts to get its own TCP/IP address using | BOOTP |
| Router broadcasts again to locate the file server IP address using | TFTP |
| Router attempts TFTP to get the IP-to-Hostname mapping file | network-confg |
| If above fails, fallback to 8.3 DOS compatible filename convention | cisconet.cfg |
| Router attempts TFTP to get its specific Hostname running-config | {Hostname}-confg |
| If above fails, fallback to 8.3 DOS compatible filename convention | {Hostname}.cfg |
| Password Recovery | |
| Step 1, halt router bootup on console port (requires physical access) | CTRL-BREAK |
| Step 2, enter RXBOOT command to set config-reg bits & stop NVRAM | o/r 0x2142 |
| Step 3, bypassing NVRAM startup allows Enable mode without pwd | enable |
| Step 4, once in Enable mode, copy NVRAM startup to RAM | copy startup-config running-config |
| Step 5, change Enable and all other passwords as desired | enable password whatever |
| Step 6, save RAM back into NVRAM, but now with new password | copy running-config startup-config |
| Step 7, change config-reg bits back, so router boots normally | config-reg 0x2102 |
| NAT | |
Router(config)#interface FastEthernet0/0 | |
Router(config-if)#ip nat outside | |
Router(config)#interface
FastEthernet0/1 | |
Router(config-if)#ip nat inside | |
Router(config)#access-list
100 permit ip
192.168.4.0 0.0.0.255 any |
|
Router(config)#ip nat inside source list
100 interface FastEthernet0/0 overload |
|
| Routing | |
| Statický | ip route 208.213.190.0 255.255.255.0 208.213.188.2
alebo ip route 208.213.190.0 255.255.255.0 Serial1 |
| default route | ip route 0.0.0.0 0.0.0.0 Serial0 |
| Routing Information Protocol (RIP) | router rip |
| network 172.16.0.0 | |
| timers basic 10 25 30 40 | |
| Interior Gateway Routing Protocol (IGRP) | router igrp 10 |
| network 172.16.0.0 | |
| Enhanced Interior Gateway Routing Protocol (EIGRP) | router eigrp 10 |
| network 172.16.0.0 | |
| Open Shortest Path First (OSPF) | router ospf 10 |
| network 172.16.0.0 0.0.255.255 area 0 | |
| Cisco IOS Firewall configuration - inšpekcia | ip inspect name myfw tcp |
| ip inspect name myfw udp | |
| ip inspect name myfw ftp | |
| ip inspect name myfw realaudio | |
| ip inspect name myfw smtp | |
| ip inspect name myfw streamworks | |
| ip inspect name myfw vdolive | |
| ip inspect name myfw tftp | |
| ip inspect name myfw rcmd | |
| ip inspect name myfw http | |
| interface FastEthernet0/1 | |
| ip inspect myfw out | |
| Debug Commands | |
| Enable debug for RIP | debug ip rip |
| Enable summary IGRP debug information | debug ip igrp events |
| Enable detailed IGRP debug information | debug ip igrp transactions |
| Enable debug for CHAP or PAP | debug ppp authentication |
| Switch all debugging off | undebug all, no debug all |
| Command Mode | Access Method |
Prompt |
Exit Method |
| User EXEC | Log in. | Router> |
Use the logout command. |
| Privileged EXEC or enable | From user EXEC mode, use the enable EXEC command. | Router# |
To exit back to user EXEC mode, use the disable command. To enter global configuration mode, use the configure privileged EXEC command. |
| Global configuration | From privileged EXEC mode, use the configure privileged EXEC command. | Router(config)# |
To exit to privileged EXEC mode, use the exit or end command or press Ctrl-Z. To enter interface configuration mode, enter an interface configuration command. |
| Interface configuration | From global configuration mode, enter by specifying an interface with an interface command. | Router(config-if)# |
To exit to global configuration mode, use the exit command. To exit to privileged EXEC mode, use the exit command or press Ctrl-Z. To enter subinterface configuration mode, specify a subinterface with the interface command. |
| Subinterface configuration | From interface configuration mode, specify a subinterface with an interface | Router(config-subif)# |
To exit to global configuration mode, use the exit command. To enter privileged EXEC mode, use the end command or press Ctrl-Z. |
| Controller configuration | From global configuration mode, use the controller command to configure a channelized T1 interface. | Router(config-controller)# |
To exit to global configuration mode, use the exit command. To enter privileged EXEC mode, use the end command or press Ctrl-Z. |
| Hub configurationn | From global configuration mode, enter by specifying a hub with the hub command. | Router(config-hub)# |
To exit to global configuration mode, use the exit command. To enter privileged EXEC mode, use the end command or press Ctrl-Z |
| Line configuration | From global configuration mode, enter by specifying a line with a line command. | Router(config-line)# |
To exit to global configuration mode, use the exit command. To enter privileged EXEC mode, use the end command or press Ctrl-Z. |
| Router configuration | From global configuration mode, enter by issuing a command that begins with router (such as router igrp). | Router(config-router)# |
To exit to global configuration mode, use the exit command. To enter privileged EXEC mode, use the end command or press Ctrl-Z. |
| IPX-router configuration | From global configuration mode, enter by issuing the ipx routing command, then a command that begins with ipx router (such as ipx router eigrp). | Router(config-ipx-router)# |
To exit to global configuration mode, use the exit command. |
| From privileged EXEC mode, use the reload EXEC command. Press Break during the first 60 seconds while the system is booting. | > |
To exit to user EXEC mode, type continue. | |
| Interface channel configuration | From global EXEC mode, use the interface channel 1/2 command. | Router(config) |
To exit to global configuration mode, use the exit command. |
| Initial Setup modee | From global EXEC mode, use the setup command or use the write erase command followed by the reload command. | Would you like to enter the initial configuration dialog? [yes]: | To exit from setup command, respond with no. |
| Access-list configuration | From global configuration mode, use the ip access-list command. | Router(config-std-nacl)# or Router(config-ext-nacl)# |
To exit to global configuration mode, use the exit command |
Type of network |
Netmask |
|
| Class A | 255.0.0.0 | 0.255.255.255 |
| Class B | 255.255.0.0 | 0.0.255.255 |
| Class C | 255.255.255.0 | 0.0.0.255 |
| Class C 2-bit subnet | 255.255.255.192 | 0.0.0.63 |
| Class B 4-bit subnet | 255.255.240.0 | 0.0.31.255 |
Class C Network Subnetting
Network Mask |
Prefix Length |
Subnet Bits |
Node Bits |
Subnets |
Hosts |
255.255.0.0 |
/16 |
0 |
16 |
0 (1 Net) |
655344 |
255.255.192.0 |
/18 |
2 |
14 |
2 |
16382 |
255.255.224.0 |
/19 |
3 |
13 |
6 |
8190 |
255.255.240.0 |
/20 |
4 |
12 |
14 |
4094 |
255.255.248.0 |
/21 |
5 |
11 |
30 |
2046 |
255.255.252.0 |
/22 |
6 |
10 |
62 |
1022 |
255.255.254.0 |
/23 |
7 |
9 |
126 |
510 |
255.255.255.0 |
/24 |
8 |
8 |
254 |
254 |
255.255.255.128 |
/25 |
9 |
7 |
510 |
126 |
255.255.255.192 |
/26 |
10 |
6 |
1022 |
62 |
255.255.255.224 |
/27 |
11 |
5 |
2046 |
30 |
255.255.255.240 |
/28 |
12 |
4 |
4094 |
14 |
255.255.255.248 |
/29 |
13 |
3 |
8190 |
6 |
255.255.255.252 |
/30 |
14 |
2 |
16382 |
Class B Network Subnetting
Network Mask |
Prefix Length |
Subnet Bits |
Node Bits |
Subnets |
Hosts |
255.255.255.0 |
/24 |
0 |
8 |
0 (1 Net) |
2544 |
255.255.255.192 |
/26 |
2 |
6 |
2 |
62 |
255.255.255.224 |
/27 |
3 |
5 |
6 |
30 |
255.255.255.240 |
/28 |
4 |
4 |
14 |
14 |
255.255.255.248 |
/29 |
5 |
3 |
30 |
6 |
255.255.255.252 |
/30 |
6 |
2 |
62 |
2 |