Ipv4 Dns Default Gateway Subnetmask

ISP gives us 4 things

1)IPV4 address
2)DNS
3)Default Gateway
4)Subnet Mask

ipv4 address is used for identify device on a network and to reach other host on internet
dns used for convert domain name into ip address,used when we provide domain name instead of ip,and dns used in the process of reaching ther host
defulat gateway is the router’s ip address
being a host why we need subnet mask
subnet mask is used by routers to direct traffic to the desired subnet,then why hosts need subnet mask?,hosts also use subnet mask
to find whether destination ip is in same network or diffrent network,if destination ip is in same network host will directly send packet
if other network host will send it router and router forwards to the destination
even though host need subnet mask to differntiate diff network ,subnet mask is set in a way that evry ip is belongs to the difrrent network
subnet mask used by our computer’s 255.255.255.255
if use above subnet mask and do bitwise AND we get that ip is nid so every ip is treated as its own network
so evry packet must reach the router to send packet even 2 hosts are in same network this will increase privacy of the network

Written on April 17, 2023