Re: inet hosts question
Gary Hartl wrote: Hi all; I have a quick question, I am trying to block a range of ip's for the sake of example they are 192.168.0.0 - 192.168.255.255 For the life of me I can't remember how to do that. What mechanism? null route, ipfw, ipf or pf I thought I could do it by using the /class ie /32 for class c but i can't remember what the class delegation is for that size of pool, I think it is a class B. 192.168.0.0/16 for your example. and yes this is a class B (not all /16s are though.) the /x notation is called CIDR (classless interdomain routing.) http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing Vince All help would be appreciated. Cheers, Gary ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: inet hosts question
Vincent Hoffman wrote: Gary Hartl wrote: I thought I could do it by using the /class ie /32 for class c but i can't remember what the class delegation is for that size of pool, I think it is a class B. 192.168.0.0/16 for your example. and yes this is a class B (not all /16s are though.) the /x notation is called CIDR (classless interdomain routing.) http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing Class C surely? 192.168.0.0/16 is the RFC1918 Class C reserved range of 256 /24 networks. Yes, Class B networks were /16s, but the A, B, C... classification is derived from the number of leading 1's in the binary representation of the first octet of the address, not the netmask. Thus Binary: Decimal:Class: Used for: - -- 0111 (0 - 127) Class A /8 Networks 1000 -- 1011 (128 - 191) Class B /16 Networks 1100 -- 1101 (192 - 223) Class C /24 Networks 1110 -- 1110 (224 - 239) Class D Multicast 0111 -- (240 - 255) Class E Reserved, experimental Hence the first /half/ of the address space was reserved for class A network allocations (16777214 hosts per net) and half of the rest was reserved for class B allocations (65534 hosts per net). Some large Universities probably could justify a Class B allocation, but I don't think any single institution or body has ever put enough machines onto the Internet to justify having a whole Class A network to themselves according to modern criterea. Needless to say, this was incredibly wasteful scheme in terms of address space coverage. As the whole 'network class' thing was an early attempt to just shave a few bytes of RAM in internet routers by not having to store explicit netmasks -- an economy that was rapidly made obsolete by the falling cost and increasing capacity of hardware -- class based allocation is now completely obsolete and we live in a fully CIDR world. Except that is, for the 'Class D' and 'Class E' (Multicast and Experimental) ranges which still exist. It's also why the loopback interface is given a /8 netmask -- 127.0.0.1 is a Class A address by this scheme. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: inet hosts question
Matthew Seaman wrote: Vincent Hoffman wrote: Gary Hartl wrote: I thought I could do it by using the /class ie /32 for class c but i can't remember what the class delegation is for that size of pool, I think it is a class B. 192.168.0.0/16 for your example. and yes this is a class B (not all /16s are though.) the /x notation is called CIDR (classless interdomain routing.) http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing Class C surely? 192.168.0.0/16 is the RFC1918 Class C reserved range of 256 /24 networks. Doh yes indeed. no idea why i said B. not the stupidest thing i've said today either ;) Vince Yes, Class B networks were /16s, but the A, B, C... classification is derived from the number of leading 1's in the binary representation of the first octet of the address, not the netmask. Thus Binary: Decimal:Class: Used for: - -- 0111 (0 - 127) Class A /8 Networks 1000 -- 1011 (128 - 191) Class B /16 Networks 1100 -- 1101 (192 - 223) Class C /24 Networks 1110 -- 1110 (224 - 239) Class D Multicast 0111 -- (240 - 255) Class E Reserved, experimental Hence the first /half/ of the address space was reserved for class A network allocations (16777214 hosts per net) and half of the rest was reserved for class B allocations (65534 hosts per net). Some large Universities probably could justify a Class B allocation, but I don't think any single institution or body has ever put enough machines onto the Internet to justify having a whole Class A network to themselves according to modern criterea. Needless to say, this was incredibly wasteful scheme in terms of address space coverage. As the whole 'network class' thing was an early attempt to just shave a few bytes of RAM in internet routers by not having to store explicit netmasks -- an economy that was rapidly made obsolete by the falling cost and increasing capacity of hardware -- class based allocation is now completely obsolete and we live in a fully CIDR world. Except that is, for the 'Class D' and 'Class E' (Multicast and Experimental) ranges which still exist. It's also why the loopback interface is given a /8 netmask -- 127.0.0.1 is a Class A address by this scheme. Cheers, Matthew ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: inet hosts question
On Fri, Nov 14, 2008, Matthew Seaman wrote: Vincent Hoffman wrote: Gary Hartl wrote: I thought I could do it by using the /class ie /32 for class c but i can't remember what the class delegation is for that size of pool, I think it is a class B. 192.168.0.0/16 for your example. and yes this is a class B (not all /16s are though.) the /x notation is called CIDR (classless interdomain routing.) http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing Class C surely? 192.168.0.0/16 is the RFC1918 Class C reserved range of 256 /24 networks. Yes, Class B networks were /16s, but the A, B, C... classification is derived from the number of leading 1's in the binary representation of the first octet of the address, not the netmask. Thus Binary: Decimal:Class: Used for: - -- 0111 (0 - 127) Class A /8 Networks 1000 -- 1011 (128 - 191) Class B /16 Networks 1100 -- 1101 (192 - 223) Class C /24 Networks 1110 -- 1110 (224 - 239) Class D Multicast 0111 -- (240 - 255) Class E Reserved, experimental As a suggestion to the OP, installing the ipcalc port might help make things more understandable, or otherwise facilitate learning[1] about networking generally. The output is optionally coloured, so the first three bits of the Network address, for example, would appear in red to serve as a reminder that an address beginning with 110 does indeed define it as a Class C address. % ipcalc 192.168.0.0 Address: 192.168.0.0 1100.10101000.. Netmask: 255.255.255.0 = 24 ... Wildcard: 0.0.0.255... = Network: 192.168.0.0/24 1100.10101000.. HostMin: 192.168.0.1 1100.10101000.. 0001 HostMax: 192.168.0.2541100.10101000.. 1110 Broadcast: 192.168.0.2551100.10101000.. Hosts/Net: 254 Class C, Private Internet --- 1. Handy utilities in conjunction with a requisite amount of laziness may be considered an adequate substitute. -- George ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]