Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Modifying IP Address/Gateway/Subnet in SCO Unix Post 12598 by Neo on Thursday 3rd of January 2002 05:45:20 PM
Old 01-03-2002
man ifconfig ....

The ifconfig command (and the route command are places to start exploring.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

IP address and gateway info

How can I change the IP address and gateway info on a unix server? (2 Replies)
Discussion started by: gguzman
2 Replies

2. UNIX for Dummies Questions & Answers

gateway address

How can I change the gateway address on my sco Openserver 5.0.6. A cisco firewall is recently installed but the gateway on the system is still pointing at the old one. I want it to use the gateway address of the router. Please help. Thanks (2 Replies)
Discussion started by: sshokunbi
2 Replies

3. SCO

ACL for Subnet/IP address

I am trying to find out if you can create an ACL for telnet sessions and restrict it to a certain subnet/IP range.. any information or where to look would be greatly appreciated. thanks (1 Reply)
Discussion started by: marvin51796
1 Replies

4. Shell Programming and Scripting

ip address and subnet comparing

Hmmm, tough question for me, so I put it here. I am trying to use shell script or mysql to do the following thing. tableA, in which all are single ips. sip ------- 1.2.3.4 8.8.8.8 123.3.32.1 .... and tableB, a list of our group subnets. subnet --------- 1.0.0.0/8 20.0.1.0/24 (2 Replies)
Discussion started by: fedora
2 Replies

5. Programming

how we can get gateway address

how we can get the gateway address. i know gethostname used for ipaddress how we can get the system gateway address. thank u inadvance, sree (2 Replies)
Discussion started by: phani_sree
2 Replies

6. IP Networking

Static IP / Subnet mask and Gateway

Hi all, I installed Fedora 9 + squid at one of PC at work. Our company has windows 2003 servera acting as DHCP server. During installation, i set linux box up as Static IP (192.168.0.100) But once installation completed, The pc is assigned a different IP address instead of 192.168.0.100.... (3 Replies)
Discussion started by: c00kie88
3 Replies

7. IP Networking

Migrating existing Subnet to a new subnet and changing ip addresses in UNIX

Hi, My project needs to migrate the existing Subnet (255.255.255.0) to a new subnet and change the ipaddresses (currently C class). How can I do that. I need some information. John (0 Replies)
Discussion started by: johnmarsh
0 Replies

8. IP Networking

lookup ip address, subnet mask, gateway, and dns at same time

Is there a command that can lookup ip address, subnet mask, gateway, and dns all at the same. I know ifconfig can lookup ip address and subnet mask. I know route -n can lookup gateway. Not sure about a dns command. So I hope there is a way to lookup ip address, subnet mask, gateway, and dns all at... (2 Replies)
Discussion started by: cokedude
2 Replies

9. Shell Programming and Scripting

Grep IP address form a text file along with the subnet

I have an input file: class 1 3 5 10.10.10..0/23 hicks jimmy class 3 10.12.10.0/22 mike class.019283 10.10.15.10/20 henry gym.847585 45 192.168.10.0/22 nancy jim steve maya The output should look like this: 10.10.10..0/23 10.12.10.0/22 10.10.15.10/20 192.168.10.0/22 I have the... (3 Replies)
Discussion started by: e_mikey_2000
3 Replies

10. Shell Programming and Scripting

Get all ip address from subnet mask

I have this subnet file shown below. How can I calculate all ip addresses from that list 103.22.200.0/22 141.101.64.0/18 10.0.0.0/22I need to be able to read the subnet file and print all IPs in those subnet to an out put file (3 Replies)
Discussion started by: e_mikey_2000
3 Replies
GRE(4)							   BSD Kernel Interfaces Manual 						    GRE(4)

NAME
gre -- encapsulating network device SYNOPSIS
To compile the gre device into the kernel, place the following line in the kernel configuration file: device gre Alternatively, to load the gre device as a module at boot time, place the following line in loader.conf(5): if_gre_load="YES" DESCRIPTION
The gre network interface pseudo device encapsulates datagrams into IP. These encapsulated datagrams are routed to a destination host, where they are decapsulated and further routed to their final destination. The ``tunnel'' appears to the inner datagrams as one hop. gre interfaces are dynamically created and destroyed with the ifconfig(8) create and destroy subcommands. This driver currently supports the following modes of operation: GRE encapsulation (IP protocol number 47) Encapsulated datagrams are prepended an outer datagram and a GRE header. The GRE header specifies the type of the encapsulated data- gram and thus allows for tunneling other protocols than IP like e.g. AppleTalk. GRE mode is also the default tunnel mode on Cisco routers. This is also the default mode of operation of the gre interfaces. As part of the GRE mode, gre also supports Cisco WCCP protocol, both version 1 and version 2. Since there is no reliable way to distinguish between WCCP versions, it should be configured manually using the link2 flag. If the link2 flag is not set (default), then WCCP version 1 is selected. MOBILE encapsulation (IP protocol number 55) Datagrams are encapsulated into IP, but with a shorter encapsulation. The original IP header is modified and the modifications are inserted between the so modified header and the original payload. Like gif(4), only for IP-in-IP encapsulation. The gre interfaces support a number of ioctl(2)s, such as: GRESADDRS Set the IP address of the local tunnel end. This is the source address set by or displayed by ifconfig(8) for the gre interface. GRESADDRD Set the IP address of the remote tunnel end. This is the destination address set by or displayed by ifconfig(8) for the gre interface. GREGADDRS Query the IP address that is set for the local tunnel end. This is the address the encapsulation header carries as local address (i.e., the real address of the tunnel start point). GREGADDRD Query the IP address that is set for the remote tunnel end. This is the address the encapsulated packets are sent to (i.e., the real address of the remote tunnel endpoint). GRESPROTO Set the operation mode to the specified IP protocol value. The protocol is passed to the interface in (struct ifreq)->ifr_flags. The operation mode can also be given as link0 IPPROTO_GRE -link0 IPPROTO_MOBILE to ifconfig(8). The link1 flag is not used to choose encapsulation, but to modify the internal route search for the remote tunnel endpoint, see the BUGS section below. GREGPROTO Query operation mode. GRESKEY Set the GRE key used for outgoing packets. A value of 0 disables the key option. GREGKEY Get the GRE key currently used for outgoing packets. 0 means no outgoing key. Note that the IP addresses of the tunnel endpoints may be the same as the ones defined with ifconfig(8) for the interface (as if IP is encap- sulated), but need not be, as e.g. when encapsulating AppleTalk. EXAMPLES
Configuration example: Host X-- Host A ----------------tunnel---------- Cisco D------Host E | / +------Host B----------Host C----------+ On host A (FreeBSD): route add default B ifconfig greN create ifconfig greN A D netmask 0xffffffff linkX up ifconfig greN tunnel A D route add E D On Host D (Cisco): Interface TunnelX ip unnumbered D ! e.g. address from Ethernet interface tunnel source D ! e.g. address from Ethernet interface tunnel destination A ip route C <some interface and mask> ip route A mask C ip route X mask tunnelX OR On Host D (FreeBSD): route add default C ifconfig greN create ifconfig greN D A ifconfig greN tunnel D A If all goes well, you should see packets flowing ;-) If you want to reach Host A over the tunnel (from Host D (Cisco)), then you have to have an alias on Host A for e.g. the Ethernet interface like: ifconfig <etherif> alias Y and on the Cisco: ip route Y mask tunnelX A similar setup can be used to create a link between two private networks (for example in the 192.168 subnet) over the Internet: 192.168.1.* --- Router A -------tunnel-------- Router B --- 192.168.2.* / / +------ the Internet ------+ Assuming router A has the (external) IP address A and the internal address 192.168.1.1, while router B has external address B and internal address 192.168.2.1, the following commands will configure the tunnel: On router A: ifconfig greN create ifconfig greN 192.168.1.1 192.168.2.1 link1 ifconfig greN tunnel A B route add -net 192.168.2 -netmask 255.255.255.0 192.168.2.1 On router B: ifconfig greN create ifconfig greN 192.168.2.1 192.168.1.1 link1 ifconfig greN tunnel B A route add -net 192.168.1 -netmask 255.255.255.0 192.168.1.1 Note that this is a safe situation where the link1 flag (as discussed in the BUGS section below) may (and probably should) be set. NOTES
The MTU of gre interfaces is set to 1476 by default, to match the value used by Cisco routers. If grekey is set this is lowered to 1472. This may not be an optimal value, depending on the link between the two tunnel endpoints. It can be adjusted via ifconfig(8). For correct operation, the gre device needs a route to the destination that is less specific than the one over the tunnel. (Basically, there needs to be a route to the decapsulating host that does not run over the tunnel, as this would be a loop.) If the addresses are ambiguous, doing the ifconfig tunnel step before the ifconfig(8) call to set the gre IP addresses will help to find a route outside the tunnel. In order to tell ifconfig(8) to actually mark the interface as ``up'', the keyword up must be given last on its command line. The kernel must be set to forward datagrams by setting the net.inet.ip.forwarding sysctl(8) variable to non-zero. SEE ALSO
gif(4), inet(4), ip(4), netintro(4), protocols(5), ifconfig(8), sysctl(8) A description of GRE encapsulation can be found in RFC 1701 and RFC 1702. A description of MOBILE encapsulation can be found in RFC 2004. AUTHORS
Heiko W.Rupp <hwr@pilhuhn.de> BUGS
The compute_route() code in if_gre.c toggles the last bit of the IP-address to provoke the search for a less specific route than the one directly over the tunnel to prevent loops. This is possibly not the best solution. To avoid the address munging described above, turn on the link1 flag on the ifconfig(8) command line. This implies that the GRE packet des- tination and the ifconfig remote host are not the same IP addresses, and that the GRE destination does not route over the gre interface itself. The current implementation uses the key only for outgoing packets. Incomming packets with a different key or without a key will be treated as if they would belong to this interface. RFC1701 is not fully supported, however all unsupported features have been deprecated in RFC2784. BSD
June 20, 2008 BSD
All times are GMT -4. The time now is 01:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy