Skip to content

NishanthAV/python-robotframework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

python-robotframework

These are all different protocols and technologies used in networking.

Layer 2 and Layer 3 refer to the OSI Model layers in which these protocols operate. Layer 2 protocols, such as Ethernet and PPPoE, are responsible for transmitting data between devices on the same network segment, while Layer 3 protocols, such as OSPF, BGP, and IS-IS, are responsible for routing data between different network segments. OSPF (Open Shortest Path First) is a routing protocol used to distribute routing information within a single autonomous system (AS) in a IP network. PPPoE (Point-to-Point Protocol over Ethernet) is a protocol used to establish a PPP connection over an Ethernet link. It is commonly used to provide Internet access over DSL connections. L2TP (Layer 2 Tunneling Protocol) is a protocol used to support virtual private networks (VPNs). It allows the creation of virtual point-to-point connections through the use of tunneling. DHCP (Dynamic Host Configuration Protocol) is a protocol used to automatically assign IP addresses and other network configuration information to devices on a network. BGP (Border Gateway Protocol) is a protocol used to exchange routing information between routers in different autonomous systems (AS) on the Internet. IS-IS (Intermediate System to Intermediate System) is a routing protocol used to distribute routing information within a single autonomous system (AS) in a IP network.

write a program to validate IP address.

import re

def validate_ip(ip_address): # Regular expression to match valid IP addresses pattern = "^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" match = re.search(pattern, ip_address) if match: return True else: return False

Test the function

ip_address = "192.168.1.1" print(validate_ip(ip_address)) # Output: True

ip_address = "256.256.256.256" print(validate_ip(ip_address)) # Output: False

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published