This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
fuss:networking [2017/02/22 18:30] – external edit 127.0.0.1 | fuss:networking [2020/05/16 22:55] – [Determine ISP Address Blocks] office | ||
---|---|---|---|
Line 266: | Line 266: | ||
* '' | * '' | ||
* '' | * '' | ||
+ | |||
+ | ====== Determine ISP Address Blocks ====== | ||
+ | |||
+ | Either starting from a hostname, for instance '' | ||
+ | <code bash> | ||
+ | nslookup tb1060.lon.100tb.com | ||
+ | </ | ||
+ | |||
+ | to determine the IP address, or from the IP address itself (in this case, '' | ||
+ | |||
+ | First, lookup the IP itself to determine which ISP it belongs to: | ||
+ | <code bash> | ||
+ | whois 146.185.28.59 | ||
+ | </ | ||
+ | |||
+ | Then, lookup the Autonomous System (AS) number (an ISP identifier code, if you will) of that ISP: | ||
+ | <code bash> | ||
+ | whois -h whois.radb.net 146.185.28.59 | grep ^origin | ||
+ | </ | ||
+ | |||
+ | which should output: | ||
+ | < | ||
+ | origin: | ||
+ | </ | ||
+ | |||
+ | There may be more AS numbers for small internet providers that are, in turn, customers of a larger network. | ||
+ | |||
+ | To make sure that the IP you are after is part of the AS, lookup the AS itself: | ||
+ | <code bash> | ||
+ | whois AS29302 | ||
+ | </ | ||
+ | |||
+ | and make sure that the ISP is listed. | ||
+ | |||
+ | The final step is to get all known routes for the AS: | ||
+ | <code bash> | ||
+ | whois -h whois.radb.net -- -i origin -T route AS29302 | grep ^route | awk '{ print $2 }' | ||
+ | </ | ||
+ | |||
+ | which should output all IPv4 address blocks allocated to that ISP line-by-line (easy to automate): | ||
+ | <code bash> | ||
+ | 146.185.16.0/ | ||
+ | </ | ||
+ | |||
+ | IPv6 can also be queried in the same way: | ||
+ | <code bash> | ||
+ | whois -h whois.radb.net -- -i origin -T route6 AS29302 | grep ^route | awk '{ print $2 }' | ||
+ | </ | ||
+ | |||
+ | and will yield similar results: | ||
+ | <code bash> | ||
+ | 2a01: | ||
+ | </ | ||
+ | |||
+ | ====== Solving Issues with PXE Servers not Working with Network Bridges with Spanning Tree Protocol Enabled ====== | ||
+ | |||
+ | A typical scenario of a non-working PXE server is a PXE server that has been set up on a Linux server running virtual machines that automatically join an STP-enabled network bridge once the virtual machine boots. | ||
+ | |||
+ | The phenomenon is due to STP itself that runs through various stages ('' | ||
+ | |||
+ | Cisco routers have a (nasty) hack named '' | ||
+ | |||
+ | In order to resolve the issue, STP can be turned off for the entire bridge: | ||
+ | <code bash> | ||
+ | brctl stp br0 off | ||
+ | </ | ||
+ | but that means losing the extra benefits of having the STP protocol. | ||
+ | |||
+ | Instead, and even better than Cisco '' | ||
+ | |||
+ | <code bash> | ||
+ | brctl setfd br0 2 | ||
+ | </ | ||
+ | where: | ||
+ | * '' | ||
+ | |||
+ | On Debian, in case the bridge is configured via ''/ | ||
+ | < | ||
+ | auto br0 | ||
+ | iface br0 inet static | ||
+ | ... | ||
+ | # Enable STP | ||
+ | bridge_stp on | ||
+ | # Fix PXE with STP | ||
+ | bridge_fd 2 | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||