Sponsored Content
Operating Systems Linux Red Hat alias ip problem,i canīt find out solution Post 302664129 by pabloli150 on Friday 29th of June 2012 03:42:17 AM
Old 06-29-2012
alias ip problem,i canīt find out solution

hi,

we have eth1; in the beginning it was proposed to create from eth1, eth1.2500 and eth1.240. It did not worked cause vlan 1.2500 was not tagged in the switch.

so they decided to leave eth1 like a physical interface with eth1.2500 config (removel vlan tag) and create eth1.240

but it did not work because when eth1.240 is up , the eth1 lose itīs gateway using eth1.240 gateway. manually we get to assing its gateway but its a temporal solution , cause if service network or server is restarted it turns back. we need a permanent solution.

i attach how is the config done:

Code:
rh0089:root:/etc/sysconfig# cat network

NETWORKING=yes

NETWORKING_IPV6=no

IPV6INIT=none

HOSTNAME=rh0089

NOZEROCONF=true

GATEWAY=10.130.0.4


 

rh0089:root:/etc/sysconfig/network-scripts# cat ifcfg-eth1

# Broadcom Corporation NetXtreme BCM5715S Gigabit Ethernet

DEVICE=eth1

BOOTPROTO=none

HWADDR=18:A9:05:xx:xx:12

ONBOOT=yes

GATEWAY=10.130.0.4

IPADDR=10.130.0.12

NETMASK=255.255.255.192

TYPE=Ethernet

IPV6INIT=no

 

rhge0082:root:/etc/sysconfig/network-scripts# cat ifcfg-eth1.240

# Broadcom Corporation NetXtreme BCM5715S Gigabit Ethernet

DEVICE=eth1.240

BOOTPROTO=none

HWADDR=18:A9:xx:xx:49:12

ONBOOT=yes

GATEWAY=10.224.248.1

IPADDR=10.224.248.103

NETMASK=255.255.255.0

TYPE=Ethernet

IPV6INIT=no

VLAN=yes
 

rh0089:root:/etc/sysconfig/network-scripts# cat route-eth1.240

ADDRESS0=10.53.129.0

GATEWAY0=10.224.248.1

NETMASK0=255.255.255.240

ADDRESS1=10.53.129.192

GATEWAY1=10.224.248.1

NETMASK1=255.255.255.240

 

rh0089:root:/etc/sysconfig/network-scripts# route -n

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

10.53.129.192   10.224.248.1    255.255.255.240 UG    0      0        0 eth1.240

10.53.129.0     10.224.248.1    255.255.255.240 UG    0      0        0 eth1.240

10.130.0.0      0.0.0.0         255.255.255.192 U     0      0        0 eth1

10.129.15.0     0.0.0.0         255.255.255.128 U     0      0        0 eth0.1020

10.224.248.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1.240

10.129.0.0      10.129.15.3     255.255.0.0     UG    0      0        0 eth0.1020

0.0.0.0         10.130.0.4      0.0.0.0         UG    0      0        0 eth1




bold line (last one) is the one which is not included in route tables by default, even if GATEWAY is configured in /etc/sysconfig/network

we looked for a file which could affect including a route by default but we didnt find it.


thanks , i really need help with this issue

cheers

Pablo

---------- Post updated at 07:42 AM ---------- Previous update was at 07:08 AM ----------

i rebooted the server, and iīīve been thinking about using this command

/sbin/ip route flush table all

but i think if i already rebooted after erase all eth1.240 (route too) files it would be useless
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

alias for find

I've tried to define an alias for the find cmd. I want a find -name and send the error messages to /dev/null. I entered the alias as followed: # alias myfind 'find $1 -name $2 2>/dev/null' But it didn't work. Any idea what's wrong with that? (2 Replies)
Discussion started by: sTorm
2 Replies

2. Shell Programming and Scripting

Solution to this must be as intresting as the problem :)

Hi all , I am looking for a KSH script to do the following: 1) take input string from a user . 2) grep this string in a file . the file format is like this FUNCTION homeph_phone_id RETURN NUMBER; FUNCTION vmph_phone_id RETURN NUMBER; FUNCTION workph_phone_id RETURN NUMBER; FUNCTION... (2 Replies)
Discussion started by: myelvis
2 Replies

3. Shell Programming and Scripting

Expect Script - Need help to find solution

I am facing below issue with my script. below is one of the test out of 50 test from the tool which i m trying to automate. the test may show up or may not depending upon the previous results and also from the test some inputs may be asked or may not be asked depending upon previous results so you... (1 Reply)
Discussion started by: snehalb
1 Replies

4. Shell Programming and Scripting

Please can you help me find a solution in this program in unix ?

Write shell script to read 3 numbers and print them in revers and print wither they are polyndrome numbers or not ????? (2 Replies)
Discussion started by: lovelorn_mn
2 Replies

5. UNIX for Dummies Questions & Answers

Can't find where alias is set

I have an alias set on linux: progs -> /home/user01/prog1.pl the location of prog is changes to /home/user01/new/prog1.pl so I need to modify alias, except I can not find where it is set. It is not in .bashrc or .profile, it is visible by "alias" command. Sorry if it is trivial. (4 Replies)
Discussion started by: analyst
4 Replies

6. Shell Programming and Scripting

Help me to find a solution using UNIX commands

I have the below requirement. below is the content of the input file and my expected result Input file: a.txt <?xml version="1.0" encoding="UTF-8"?> <Employee> <Name>XXXX</Name> <ID>1233</ID> </Employee> <?xml version="1.0" encoding="UTF-8"?> <Employee> <Name>YYYY</Name> <ID>1345</ID>... (2 Replies)
Discussion started by: kmanivan82
2 Replies
Match-all classifier in tc(8)					       Linux					     Match-all classifier in tc(8)

NAME
matchall - traffic control filter that matches every packet SYNOPSIS
tc filter ... matchall [ skip_sw | skip_hw ] [ action ACTION_SPEC ] [ classid CLASSID ] DESCRIPTION
The matchall filter allows to classify every packet that flows on the port and run a action on it. OPTIONS
action ACTION_SPEC Apply an action from the generic actions framework on matching packets. classid CLASSID Push matching packets into the class identified by CLASSID. skip_sw Do not process filter by software. If hardware has no offload support for this filter, or TC offload is not enabled for the inter- face, operation will fail. skip_hw Do not process filter by hardware. EXAMPLES
To create ingress mirroring from port eth1 to port eth2: tc qdisc add dev eth1 handle ffff: ingress tc filter add dev eth1 parent ffff: matchall skip_sw action mirred egress mirror dev eth2 The first command creats an ingress qdisc with handle ffff: on device eth1 where the second command attaches a matchall filters on it that mirrors the packets to device eth2. To create egress mirroring from port eth1 to port eth2: tc qdisc add dev eth1 handle 1: root prio tc filter add dev eth1 parent 1: matchall skip_sw action mirred egress mirror dev eth2 The first command creats an egress qdisc with handle 1: that replaces the root qdisc on device eth1 where the second command attaches a matchall filters on it that mirrors the packets to device eth2. To sample one of every 100 packets flowing into interface eth0 to psample group 12: tc qdisc add dev eth0 handle ffff: ingress tc filter add dev eth0 parent ffff: matchall action sample rate 100 group 12 SEE ALSO
tc(8), iproute2 21 Oct 2015 Match-all classifier in tc(8)
All times are GMT -4. The time now is 11:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy