Sunday, July 17, 2016

ip addr command 4 RHEL/CentOS/Fedora

 IP addr command 4 RHEL/CentOS/Fedora

Static IP Address configuration:

[root@centos ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0


DEVICE="eth1"
BOOTPROTO=static
ONBOOT=yes
TYPE="Ethernet"
IPADDR=192.168.0.2
NAME="System eth0"
HWADDR=00:0C:00:AF:BB:4C
GATEWAY=192.168.0.1


How to Assign a IP Address to Specific Interface

ip addr add 192.168.0.2 dev eth1

How to Check an IP Address

ip addr show

How to Remove an IP Address

ip addr del 192.168.0.2/24 dev eth1


How to Enable Network Interface

ip link set eth1 up

How to Disable Network Interface

ip link set eth1 down



How do I Check Route Table

ip route show

How do I Add Static Route

ip route add 10.10.10.0/24 via 192.168.0.10 dev eth1

How to Remove Static Route

ip route del 10.10.10.0/24


How do I Add Persistence Static Routes

vi /etc/sysconfig/network-scripts/route-eth0
10.10.10.0/24 via 192.168.0.10 dev eth1

How do I Add Default Gateway

ip route add default via 192.168.0.1




Sunday, July 10, 2016

EdgeMAX -- Quick & Dirty - Syslog Server

EdgeMAX --  Quick & Dirty CLI setup remote syslog server

set system syslog host <syslog_server> facility all level notice

commit
save

exit



Sunday, July 3, 2016

FreeBSD & PPPOE

FreeBSD & PPPOE -- Quick and dirty 
Add below configuration to /etc/ppp/ppp.conf, where <interface> is your network interface toward the PPPoE server:

provider:
set device PPPoE:<interface>
set authname <PPPoE username>
set authkey <PPPoE password>
set dial
set login
add default HISADDR
enable lqr echo
enable dns
nat enable yes
set redial 2
 Start the PPPoE client, as root: /etc/rc.d/ppp start. The PPPoE interface is usually tun0.
In order to enable PPPoE client at startup, append to next info to /etc/rc.conf:
ifconfig_<interface>="up"
ppp_enable="YES"
ppp_profile="provider"
ppp_mode="ddial"