how to find out the subnetmask for each interfaces for a router ?
masterinex
Member Posts: 5 ■□□□□□□□□□
in CCNA & CCENT
how to find out the subnetmask for each interfaces for a router ? is there such a cisco command ?
Comments
-
hooky13 Member Posts: 30 ■■■□□□□□□□masterinex wrote: »how to find out the subnetmask for each interfaces for a router ? is there such a cisco command ?
A simple (show ip int) command will show you the ip address and the mask in slash notation? Is this what your looking for? With this there is still a lot of other info that is displayed....I dont know of a command that will show only the mask's. -
dontstop Member Posts: 579 ■■■■□□□□□□Give these a try:show interface <type> <number> (e.g. show int f0/1)
show protocols -
masterinex Member Posts: 5 ■□□□□□□□□□how do i convert from 10.255.255.246/30 to a number like 255.255.255.0 ?
-
WastedHat Member Posts: 132 ■■■□□□□□□□masterinex wrote: »how do i convert from 10.255.255.246/30 to a number like 255.255.255.0 ?
the /30 number represents the number of binary 1's in the subnet mask. All masks will have binary 1's on the left and 0's on the right, they never mix.
so if you convert 255.255.255.252 to binary you will get 11111111.11111111.11111111.11111100 count the 1's and you get /30 -
OfWolfAndMan Member Posts: 923 ■■■■□□□□□□Find out subnet mask? It depends on what you want it to be .
A subnet mask defines a range of IP addresses. What the subnet mask is defined as depends on where it's logically placed in the network. For example, if it's a point to point link, like between routers, you only need two valid host addresses. What subnet mask would work for that?
/30, or 255.255.255.252. This equates to 4 addresses, two that are for hosts (First address is the network identifier, the last is the broadcast address).
What if it's a single network of ~200 users?
/24, or 255.255.255.0. That equates to 254 host addresses.
To know how to compute this, learn how to subnet. Paul Browning has some good explanations. He has a website called how to network. I tried pasting the link, but it was omitting part of it for some reason .
As for if you want to know how to subnet without learning subnetting, there's always a subnetting calculator for that .:study:Reading: Lab Books, Ansible Documentation, Python Cookbook 2018 Goals: More Ansible/Python work for Automation, IPSpace Automation Course [X], Build Jenkins Framework for Network Automation []