A
A
akarin2017-07-11 16:42:20
linux
akarin, 2017-07-11 16:42:20

How to set the subnet mask?

Github is not available with a subnet mask. What route to register that worked? I can’t figure it out myself, because after the changes I can barely go to the web face of the router.
br-lan
IPv4: 192.168.1.1
IPv4 netmask: 255.0.0.0
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
192.0.0.0 0.0. 0.0 255.0.0.0 U 0 0 0 eth0
$ ping github.com
PING github.com (192.30.253.112) 56(84) bytes of data.
From debian.lan (192.0.0.243) icmp_seq=1 Destination Host Unreachable
icmp_seq=2 Destination Host Unreachable
From debian.lan (192.0.0.243) icmp_seq=3 Destination Host Unreachable
From debian.lan (192.0.0.243) icmp_seq=4 Destination Host Unreachable
From debian.lan ( icmp_seq=5 Destination Host Unreachable
From debian.lan (192.0.0.243) icmp_seq=6 Destination Host Unreachable
From debian.lan (192.0.0.243) icmp_seq=7 Destination Host Unreachable
From debian.lan (192.0.0.243) icmp_seq icmp_seq= 11 Destination Host Unreachable =8 Destination Host Unreachable
From debian.lan (192.0.0.243) icmp_seq=9 Destination Host Unreachable
From debian.lan (192.0.0.243)
icmp_seq=12 Destination Host Unreachable
From debian.lan (192.0.0.243) icmp_seq=13 Destination Host Unreachable
From debian.lan (192.0.0.243) icmp_seq=14 Destination Host Unreachable
From debian.lan ( 192.0.0.243) icmp_seq=15 Destination Host Unreachable
^C
--- github.com ping statistics ---
16 packets transmitted, 0 received, +15 errors, 100% packet loss, time 15078ms
pipe 3
It worked with a different mask, but I I want to deal with this.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Moseychuk, 2017-07-11
@akarin

This one will not work. The subnet mask declares a broadcast domain within which packets are not routed but sent directly to L2. Because with such an ip mask github gets into your subnet, then no routes will save, because this configuration actually means that the github server should be connected to your switch.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question